Fixed tests for FDB and SQL stores

This commit is contained in:
mdecimus
2025-05-23 17:07:36 +02:00
parent 2eb99ed3bd
commit c19d2ceb43
16 changed files with 113 additions and 42 deletions

View File

@@ -355,7 +355,7 @@ impl BatchBuilder {
}
pub fn commit_point(&mut self) -> &mut Self {
if self.batch_size > 5_000_000 || self.batch_ops > 1000 {
if self.is_large_batch() {
self.serialize_changes();
self.commit_points.push(self.ops.len());
self.batch_ops = 0;
@@ -370,6 +370,11 @@ impl BatchBuilder {
self
}
#[inline]
pub fn is_large_batch(&self) -> bool {
self.batch_size > 5_000_000 || self.batch_ops > 1000
}
pub fn any_op(&mut self, op: Operation) -> &mut Self {
self.ops.push(op);
self.batch_ops += 1;