Closed Ullaakut closed 2 years ago
Merging this in the meantime, but @awfm9 if you want to change the way we handle https://github.com/optakt/flow-dps/pull/523#discussion_r787636038 please LMK and we can do it in another PR. I don't want to block this one for 10 more days though so I'll merge it now to be able to move fwd on the trie improvements.
Goal of this PR
Fixes https://github.com/optakt/flow-dps/issues/522
This PR, along with https://github.com/optakt/golang-lru/pull/1 redesigns the storage system of the trie improvements:
false
, the eviction is aborted, and the element that was supposed to get evicted gets pushed back to the front of the eviction listIn the store, we run the following logic in our eviction handler:
Note: This PR includes changes that add error returns to the
Insert
method, which will conflict with the changes that @awfm9 will bring later on. It should be easy to solve those conflicts however: we just take the code from Max and add error handling in the only remaining case where we create a leaf.Checklist
Does the PR require tests to be added or updated?
This PR probably requires adding more tests, yes.
Does the PR require documentation to be added or updated?
No
Misc