Skip to content

Commit 75d7906

Browse files
pks-tgitster
authored andcommitted
reftable/stack: do not auto-compact twice in reftable_stack_add()
In 5c08645 (reftable/stack: perform auto-compaction with transactional interface, 2023-12-11), we fixed a bug where the transactional interface to add changes to a reftable stack did not perform auto-compaction by calling `reftable_stack_auto_compact()` in `reftable_stack_addition_commit()`. While correct, this change may now cause us to perform auto-compaction twice in the non-transactional interface `reftable_stack_add()`: - It performs auto-compaction by itself. - It now transitively performs auto-compaction via the transactional interface. Remove the first instance so that we only end up doing auto-compaction once. Reported-by: Han-Wen Nienhuys <[email protected]> Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d26c214 commit 75d7906

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

reftable/stack.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,6 @@ int reftable_stack_add(struct reftable_stack *st,
425425
return err;
426426
}
427427

428-
if (!st->disable_auto_compact)
429-
return reftable_stack_auto_compact(st);
430-
431428
return 0;
432429
}
433430

0 commit comments

Comments
 (0)