Fixed tests for FDB and SQL stores
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user