Refactor: Remove reverts from compressor #482
Labels
Data compressor
go
Pull requests that update Go code
good first issue
Good for newcomers
TechDebt
Technical Debt
Description
In accordance with @ivokub's feedback on #367, change the compressor's flow into one that writes on a "scratch" and in case of success copies it into the current state. This would replace the current strategy of optimistically attempting to compress and reverting if something went wrong.
Motivation
The fact that there are more ways of going wrong than going right (there are many control paths leading to a revert) has lead to complex code involving many goto-labels. The pessimistic strategy will result in smaller, more readable code.
@gbotrel thoughts?
Tasks
Acceptance criteria
Risks
Remember to
documentation
label in case there is an impact on the documentationpriority
andteam
labelsThe text was updated successfully, but these errors were encountered: