@@ -23,7 +23,7 @@ class WorkloadConfig:
2323 cover_max_columns : int = 2
2424 allowed_secondary_indexes_count : List [int ] = field (default_factory = lambda : [1 , 2 , 3 , 8 , 16 ])
2525 unique_indexes_allowed : bool = True
26- unique_index_probability : float = 0.1
26+ unique_index_probability : float = 0.05
2727 null_probability : float = 0.05
2828
2929 # Column types
@@ -476,6 +476,8 @@ def run_for_table(self, table_name: str) -> None:
476476 self .verify_table (table_name , table_info )
477477 self .drop_table (table_name )
478478
479+ print (f"Workload for table { table_name } completed." )
480+
479481 def _get_batch (self , pk_size : int , pk_only : bool , table_info : TableInfo = None ) -> List [List [Any ]]:
480482 """Generate a batch of rows for operations"""
481483 batch_rows = []
@@ -550,9 +552,9 @@ def _execute_query_with_retry(self, query: str, is_ddl: bool, parameters: Dict[s
550552 try :
551553 if parameters :
552554 logger .debug (f"Query: { query } Params: { parameters } " )
553- return self .client .query (query , is_ddl , parameters )
555+ return self .client .query (query , is_ddl , parameters , log_error = False )
554556 else :
555- return self .client .query (query , is_ddl )
557+ return self .client .query (query , is_ddl , log_error = False )
556558 except (ydb .issues .Aborted , ydb .issues .Unavailable , ydb .issues .Undetermined ) as e :
557559 last_exception = e
558560 if attempt < self .config .max_retries - 1 :
@@ -820,9 +822,10 @@ def _verify_index_uniqueness(
820822
821823 def _loop (self ):
822824 """Main loop for the workload"""
825+ iteration = 0
823826 while not self .is_stop_requested ():
824827 threads = []
825- for table_name in [f'test { i } ' for i in range (self .config .tables_inflight )]:
828+ for table_name in [f'test_ { iteration } _ { i } ' for i in range (self .config .tables_inflight )]:
826829 threads .append (
827830 threading .Thread (target = lambda t = table_name : self .run_for_table (t ), name = f'{ table_name } ' )
828831 )
@@ -833,6 +836,10 @@ def _loop(self):
833836 for thread in threads :
834837 thread .join ()
835838
839+ print (f"Iteration { iteration } finished." )
840+ print (self .stats .get_stats ())
841+ iteration += 1
842+
836843 def get_workload_thread_funcs (self ):
837844 """Get the thread functions for the workload"""
838845 return [self ._loop ]
0 commit comments