Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable vid reuse compaction #2276

Merged
merged 3 commits into from
Jun 1, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
disable vid reuse compaction
The current implementation cannot be used practically since it causes
several full reallocations of the whole free list per deletion - it
needs to be reimplemented, or the chain cannot practically progress
beyond ~2.5M blocks where a lot of removals happen.
  • Loading branch information
arnetheduck committed Jun 1, 2024
commit a028b9a2b6b5eb71dcf54e4ac0297171aca6194b
12 changes: 10 additions & 2 deletions nimbus/db/aristo/aristo_delete.nim
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,11 @@ proc delSubTreeImpl(
db.layersResKey(VertexID(1), wp.vid)

# Squeze list of recycled vertex IDs
arnetheduck marked this conversation as resolved.
Show resolved Hide resolved
db.top.final.vGen = db.vGen.vidReorg()
# TODO this causes a reallocation of vGen which slows down subsequent
# additions to the list because the sequence must grow which entails a
# full copy in addition to this reorg itself - around block 2.5M this
# causes significant slowdown as the vid list is >1M entries long
arnetheduck marked this conversation as resolved.
Show resolved Hide resolved
# db.top.final.vGen = db.vGen.vidReorg()
ok()


Expand Down Expand Up @@ -394,7 +398,11 @@ proc deleteImpl(
db.layersResKey(VertexID(1), wp.vid)

# Squeze list of recycled vertex IDs
arnetheduck marked this conversation as resolved.
Show resolved Hide resolved
db.top.final.vGen = db.vGen.vidReorg()
# TODO this causes a reallocation of vGen which slows down subsequent
# additions to the list because the sequence must grow which entails a
# full copy in addition to this reorg itself - around block 2.5M this
# causes significant slowdown as the vid list is >1M entries long
arnetheduck marked this conversation as resolved.
Show resolved Hide resolved
# db.top.final.vGen = db.vGen.vidReorg()
ok(emptySubTreeOk)

# ------------------------------------------------------------------------------
Expand Down
Loading