Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build RecoveryTool index in memory by default #4061

Merged
merged 5 commits into from Jan 24, 2020

Conversation

warwickmm
Copy link
Member

@warwickmm warwickmm commented Jan 24, 2020

This modifies the RecoveryTool so that the index is created in memory by default. This should yield a dramatic increase in performance. For low-resource situations, we allow one to use the original file-based index creation via the new --build-index-with-files option. We also modified the RecoveryTool test to verify the behavior for both cases.

The work to build the index in memory was done by @tfriedel (see revision 8848ad4 and pull request #4040).

tfriedel and others added 5 commits January 23, 2020 20:07
We will plan to default to the in-memory index, but allow one to use the
file-based index if the memory requirements are too high.
Performance is greatly improved if we can create the index in memory.
We preserve the ability to create the index using files for recovery in
low resource environments.
@@ -0,0 +1,246 @@
// Copyright (C) 2015, The Duplicati Team
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a rename of the original file-based Index class. The only modification was to move the call to SortFile from the Restore class to the end of the FileIndex.Run method.

@warwickmm
Copy link
Member Author

The Index and FileIndex classes contain a bit of duplication, but I figure we can refactor this later.

@kenkendk
Copy link
Member

Great work!

@kenkendk kenkendk merged commit 22d34f6 into duplicati:master Jan 24, 2020
@warwickmm warwickmm deleted the recovery_tool_in_memory_index branch January 25, 2020 01:44
@duplicatibot
Copy link

This pull request has been mentioned on Duplicati. There might be relevant details there:

https://forum.duplicati.com/t/timespan-to-rebuild-a-database/15654/22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants