lmdb: refine batch size estimation

This commit is contained in:
selsta
2026-08-19 22:34:05 +02:00
parent 3db83d5f4a
commit b51e8d4a44
+1 -1
View File
@@ -737,7 +737,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;