@@ -120,7 +120,10 @@ def count_and_checksum(self) -> Tuple[int, int]:
120120 )
121121 duration = time .time () - start
122122 if duration > RECOMMENDED_CHECKSUM_DURATION :
123- logger .warn (f"Checksum is taking longer than expected ({ duration :.2f} s). " )
123+ logger .warn (
124+ f"Checksum is taking longer than expected ({ duration :.2f} s). "
125+ "We recommend increasing the bisection-factor."
126+ )
124127
125128 # TODO Handle None TODO
126129 return count or 0 , checksum
@@ -243,14 +246,14 @@ def _bisect_and_diff_tables(self, table1, table2, level=0, max_rows=None):
243246 def _diff_tables (self , table1 , table2 , level = 0 , segment_index = None , segment_count = None ):
244247 logger .info (
245248 ". " * level
246- + f"Diffing segment { segment_index } /{ segment_count } , key-range: { table1 .start_key :x } ..{ table2 .end_key :x } "
249+ + f"Diffing segment { segment_index } /{ segment_count } , key-range: { table1 .start_key } ..{ table2 .end_key } "
247250 )
248251
249252 (count1 , checksum1 ), (count2 , checksum2 ) = self ._threaded_call ("count_and_checksum" , [table1 , table2 ])
250253
251- if not ( count1 or count2 ) :
254+ if count1 == 0 and count2 == 0 :
252255 logger .warn (
253- "Uneven distribution of keys detected. "
256+ "Uneven distribution of keys detected. (big gaps in the key column). "
254257 "For better performance, we recommend to increase the bisection-threshold."
255258 )
256259 assert checksum1 is None and checksum2 is None
0 commit comments