File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
foundationdb-bindingtester/src Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -757,6 +757,7 @@ impl StackMachine {
757
757
let mut stack_idx = self . stack . len ( ) ;
758
758
let trx_id = self . next_trx_id ( ) ;
759
759
let mut t = trx. take ( trx_id) ;
760
+ let mut n = 0 ;
760
761
while let Some ( stack_item) = self . maybe_pop ( ) . await {
761
762
stack_idx -= 1 ;
762
763
let mut key = prefix. clone ( ) . into_owned ( ) ;
@@ -765,8 +766,13 @@ impl StackMachine {
765
766
766
767
let value = pack ( & stack_item. data . unwrap ( ) ) ;
767
768
t. set ( & key, & value[ ..value. len ( ) . min ( 40000 ) ] ) ;
768
- t = t. commit ( ) . await . unwrap ( ) . reset ( ) ;
769
+ n += 1 ;
770
+ if n == 100 {
771
+ t = t. commit ( ) . await . unwrap ( ) . reset ( ) ;
772
+ n = 0 ;
773
+ }
769
774
}
775
+ t = t. commit ( ) . await . unwrap ( ) . reset ( ) ;
770
776
trx = TransactionState :: Transaction ( t) ;
771
777
}
772
778
You can’t perform that action at this time.
0 commit comments