t: Fixed missing lfs_alloc_ckpoint in manual btree compaction
Whoops! Turns out it's easy to forget to checkpoint the allocator when
most standalone operations involve lfsr_mdir_commit which checkpoints
the allocator automatically...
This is also the only case where we are doing btree modifications
outside of either file operations or mtree updates.
Easy fix, code changes minimal:
code stack
before: 36280 2680
after: 36288 (+0.0%) 2680 (+0.0%)
This commit is contained in:
@@ -8785,6 +8785,9 @@ dropped:;
|
||||
// compactions to work correctly
|
||||
LFS_ASSERT(lfsr_omdir_isopen(lfs, &t->o.o));
|
||||
|
||||
// checkpoint the allocator
|
||||
lfs_alloc_ckpoint(lfs);
|
||||
|
||||
if (t->o.o.state == LFSR_TSTATE_MTREE) {
|
||||
err = lfsr_btree_compact_(lfs, &t->o.bshrub.u.btree,
|
||||
// note we may be referencing the btree root here
|
||||
|
||||
Reference in New Issue
Block a user