This repository has been archived by the owner on Aug 2, 2021. It is now read-only.
chunk: fix tag Sent value on load, dont persist done tags #1914
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes a state where a chunk was sent with push sync but for which a receipt was not received due to node shutdown. Thus, it is mandatory to set the
tag.Sent
counter to thetag.Synced
counter, so that the next send of the same chunk (which still exists in push sync index) is accounted for correctly.Another change introduced here is that
Done
tags should not be persisted. I am open to discuss this but it seemed like the right thing to do at the lack of some sort of pruning mechanism. I am considering either this approach or an approach where only tags which are done and older thanX
days should not be persisted across sessions. Inputs would be appreciated.