lmdb: refine batch size estimation

(cherry picked from commit a34ed83e7290198c5e54e71d6592aef55fa47eae)
This commit is contained in:
selsta
2026-10-04 18:50:23 -04:00
committed by such-gitea
parent 16f7dfef75
commit 9f5c144a44
+1 -1
View File
@@ -766,7 +766,7 @@ estim:
MDEBUG("estimated average block size for batch: " << avg_block_size);
// bigger safety margin on smaller block sizes
if (batch_fudge_factor < 5000.0)
if (!batch_bytes && batch_fudge_factor < 5000.0)
batch_fudge_factor = 5000.0;
threshold_size = avg_block_size * db_expand_factor * batch_fudge_factor;
return threshold_size;