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

[C#] Compaction via session, update EntryCount, remove ShallowCopy #359

Merged
merged 8 commits into from
Oct 25, 2020

Conversation

badrishc
Copy link
Contributor

@badrishc badrishc commented Oct 24, 2020

  • Move Compact to ClientSession so that user does not need to implement Copy/InPlaceCopy functions. Example:
    using (var session = store.NewSession(...))
      session.Compact(address, true);
  • Update EntryCount and DumpDistribution to reflect only hash entries >= Log.BeginAddress
  • (Internal) Remove ShallowCopy since we now have serialize

Fix #358

@badrishc
Copy link
Contributor Author

badrishc commented Oct 25, 2020

This PR also simplifies log compaction. Basically, it moves the Compact call to ClientSession. This way, we can use the existing IFunctions to perform the compaction. These functions would already handle concurrency for normal operations. What this also implies is that ICompactionFunctions can be simplified to only contain IsDeleted(...) and user does not need to provide anything by default.

Usage Example

using (var session = store.NewSession(...))
   session.Compact(address, true);

We can deprecate the Compact operation on LogAccessor (i.e., store.Log.Compact(...)) - when we remove it, we can also remove the Copy and InPlaceCopy methods from the ICompactionFunctions interface.

@badrishc badrishc changed the title [C#] Remove ShallowCopy since we now have serialize [C#] Compaction via session, update EntryCount, remove ShallowCopy Oct 25, 2020
@badrishc badrishc merged commit 5d24bb8 into master Oct 25, 2020
@badrishc badrishc deleted the remove-shallow-copy branch November 11, 2020 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant