summaryrefslogtreecommitdiffstats
path: root/lib/App/BorgRestore/PathTimeTable/DB.pm
AgeCommit message (Collapse)AuthorFilesLines
2020-09-27DB: Add assertion to check for missing files in databasedevFlorian Pritz1-0/+6
This is related to 62f5bc3ce90fedb396d103caae68dc2f211f1b16 and would trigger if the optimization prevents a path from being added to the database. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2020-09-27DB: Fix incorrect subpath handling for path that is a superstring of theFlorian Pritz1-2/+3
previous path for top level paths Same issue as 62f5bc3ce90fedb396d103caae68dc2f211f1b16 except that this time it is the for top level paths (`/lib` and `/lib64`) which are handled outside the loop. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2020-09-27DB: Fix incorrect subpath handling for path that is a superstring of theFlorian Pritz1-1/+30
previous path Files that share a common substring (e.g. `/home/foo/.ssh/id_rsa` and `/home/foo/.ssh/id_rsa.pub`) could incorrectly trigger an optimization that was only supposed to be triggered if the first path is a directory. The first path would then not be added to the database cache even though it should have been. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-11-12Enable trace logging in BEGIN block for test suiteFlorian Pritz1-4/+9
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-12Remove duplicate code by calling add_path in save_nodesFlorian Pritz1-17/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-12Update cache only when going back up the stack instead of all the timeFlorian Pritz1-9/+13
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-12Only add top level directory when we actually have a top level directoryFlorian Pritz1-2/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-12Ensure that top level directories are also written to the DBFlorian Pritz1-0/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-10Remove left over debug log entryFlorian Pritz1-1/+0
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09PathTimeTable/DB: Use cache as kind of stack and only write to DB when ↵Florian Pritz1-18/+25
removing an item from the stack Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09PathTimeTable/DB: Use constant to control trace loggingFlorian Pritz1-6/+8
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09PathTimeTable/DB: Improve performance by removing usage of regex in hot placesFlorian Pritz1-6/+10
This cuts execution time on my workstation from about 85 seconds for an --update-cache adding one archive to roughly 62 seconds. Measured totally unscientifically by simply running the full application instead of isolating the code, but it makes sense that regexes are slower so I'll take it. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09Use strictures instead of strict/warningsFlorian Pritz1-2/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09PathTimeTable/DB: Add cache to reduce number of DB callsFlorian Pritz1-2/+51
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-06Add direct-to-db adding of paths instead of memory onlyFlorian Pritz1-0/+48
Signed-off-by: Florian Pritz <bluewind@xinu.at>