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

Consider Tombstone trait for Diff #298

Open
frankmcsherry opened this issue Jan 25, 2021 · 0 comments
Open

Consider Tombstone trait for Diff #298

frankmcsherry opened this issue Jan 25, 2021 · 0 comments

Comments

@frankmcsherry
Copy link
Member

In accumulating up differences, we are often lucky and they add up to zero, and we can discard the result. In some cases, mainly tombstones, we end up with something we'd like to discard (the tombstone) but which we can only do once we are sure that it has served its purpose (clobbering preceding diffs).

It seems plausible that we could inform the diff instances when they have been merged into to the oldest batch, which would imply that there would be no further updates before them. For example, there could be a tombstone(&mut self) method that gets invoked in this setting, whose implementation is by default empty (for all current implementations) but which gets called after forming each diff in the last layer. This would give tombstone diffs the opportunity to collect themselves and vanish, and would probably substantially simplify the programming of "upsert" diffs.

Very much just a musing at this point, not knowing much about the trade-offs here.

cc: @ruchirK

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

No branches or pull requests

1 participant