erigon icon indicating copy to clipboard operation
erigon copied to clipboard

[draft] remove pointless file protection during merge

Open awskii opened this issue 1 year ago • 1 comments

relates to #10733 Subset files are protected until being integrated into Domains. One case when files must be protected - during ComputeCommitment and even though it's usage is disputable.

awskii avatar Jun 24 '24 18:06 awskii

File protection is used in 3 places:

  • During ComputeCommitmentto make sure commitment reads consistent data from commitment/accounts/storage. DomainRoTx copies pointer to visible files of Domain, but there are three different domains included, easier just prohibit subset removals while computing
  • during mergeFiles. Here files kind of protected by being not included into visibleFiles until integrateMergedFiles is called. There is no other actor which is able to remove sub-range files therefore seems pointless, crash situation is covered by next point
  • inside NewAggregator: what if we just started after crash and accounts already merged while commitment is not. In that case, three domains will return different LatestMergeRange and we need to persist old sub-ranges to make sure we can decode existing referenced keys inside commitment branches.

awskii avatar Jul 03 '24 17:07 awskii

done

AskAlexSharov avatar May 30 '25 08:05 AskAlexSharov