You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new Round::reset() introduced in #288 returns storage actions rather than directly mutating the storage. This easier to test and reason about. There are other methods in Round which could be refactored to work the same way, and have more unit tests written for them:
new()
remove_contributor_unsafe (introduced during Round restart #288 to combine removed_locks_unsafe and remove_chunk_contributions_unsafe)
remove_locks_unsafe
remove_chunk_contributions_unsafe
try_lock_chunk
The following methods depend on an immutable reference to Storage, perhaps they could be decoupled:
current_contribution_locator
next_contribution_locator
next_contribution_file_signature_locator
The text was updated successfully, but these errors were encountered:
Something that came up during discussions with @ibaryshnikov was the need for transactional changes to the files on disk (#372 ), the ability to roll back if there is a problem during one of the changes in a transaction. There are probably many ways to achieve this that can be explored, this could be orthogonal to the changes being made for this issue, however one idea I did have is that a group of actions could be treated as a transaction, it would then be fairly simple to create a new Disk::process_actions function which provides the ability to reverse changes (by storing and applying opposite actions) when encountering an error (rather than simply aborting as it does now, leaving the file system in an incorrect state).
The new
Round::reset()
introduced in #288 returns storage actions rather than directly mutating the storage. This easier to test and reason about. There are other methods inRound
which could be refactored to work the same way, and have more unit tests written for them:new()
remove_contributor_unsafe
(introduced during Round restart #288 to combineremoved_locks_unsafe
andremove_chunk_contributions_unsafe
)remove_locks_unsafe
remove_chunk_contributions_unsafe
try_lock_chunk
The following methods depend on an immutable reference to
Storage
, perhaps they could be decoupled:current_contribution_locator
next_contribution_locator
next_contribution_file_signature_locator
The text was updated successfully, but these errors were encountered: