2424POLL_INTERVAL = int (os .environ .get ('POLL_INTERVAL' , '10' ))
2525IDLE_TIMEOUT = int (os .environ .get ('IDLE_TIMEOUT' , '120' ))
2626
27- # Known LOB phantom transaction issues (olr#26, olr#10)
28- # These produce expected mismatches — report but don't fail
29- KNOWN_LOB_TABLES = {'FUZZ_LOB' }
27+ # LOB tables that use final-state replay for comparison.
28+ # With the hybrid setup (OLR for non-LOB + LogMiner for LOB), these tables
29+ # should match exactly. Mismatches are treated as real failures.
30+ LOB_TABLES = {'FUZZ_LOB' }
3031
3132
3233def normalize_value (v ):
@@ -132,7 +133,6 @@ def main():
132133 total_validated = 0
133134 total_matched = 0
134135 total_mismatches = 0
135- total_lob_known = 0 # Known LOB issues (expected)
136136 total_missing_lm = 0
137137 total_missing_olr = 0
138138 total_tail_olr = 0 # OLR ahead of LM at drain time (not a bug)
@@ -245,14 +245,12 @@ def main():
245245 "SELECT table_name FROM olr_events WHERE event_id = ? LIMIT 1" ,
246246 (eid ,)).fetchone ()
247247 event_table = tbl_row ['table_name' ] if tbl_row else '?'
248- is_lob = event_table in KNOWN_LOB_TABLES
248+ is_lob = event_table in LOB_TABLES
249249
250250 if in_lm and not in_olr :
251251 total_missing_olr += 1
252252 if is_tail :
253253 total_tail_lm += 1
254- elif is_lob :
255- total_lob_known += 1
256254 else :
257255 total_mismatches += 1
258256 print (f"[MISSING_OLR] { eid } ({ event_table } )" , flush = True )
@@ -263,8 +261,6 @@ def main():
263261 total_missing_lm += 1
264262 if is_tail :
265263 total_tail_olr += 1
266- elif is_lob :
267- total_lob_known += 1
268264 else :
269265 total_mismatches += 1
270266 print (f"[EXTRA_OLR] { eid } ({ event_table } )" , flush = True )
@@ -283,20 +279,26 @@ def main():
283279
284280 if is_lob :
285281 # LOB tables: replay ops into final state, compare end result.
286- # LogMiner merges INSERT + LOB_WRITE into a single record (L2),
287- # and OLR may have extra/fewer intermediate events due to
288- # phantom undo (#15). Comparing final state avoids both issues.
282+ # Both sides use LogMiner (expected=full LM, actual=LOB-only LM),
283+ # so they should produce identical final state.
289284 lm_state , lm_exists = replay_final_state (lm_recs )
290285 olr_state , olr_exists = replay_final_state (olr_recs )
291286
292287 if lm_exists != olr_exists :
293- total_lob_known += 1
288+ total_mismatches += 1
289+ print (f"[LOB_EXISTENCE] { eid } ({ event_table } ): "
290+ f"LM exists={ lm_exists } OLR exists={ olr_exists } " ,
291+ flush = True )
294292 total_validated += 1
295293 else :
296294 diffs = compare_values (lm_state , olr_state ,
297295 event_table , 'after' )
298296 if diffs :
299- total_lob_known += 1
297+ total_mismatches += 1
298+ print (f"[LOB_VALUE_DIFF] { eid } ({ event_table } ):" ,
299+ flush = True )
300+ for d in diffs [:5 ]:
301+ print (d , flush = True )
300302 else :
301303 total_matched += 1
302304 total_validated += 1
@@ -373,7 +375,7 @@ def main():
373375 tail_str = (f" tail_olr={ total_tail_olr } tail_lm={ total_tail_lm } "
374376 if total_tail_olr or total_tail_lm else "" )
375377 print (f"[validator] validated={ total_validated } matched={ total_matched } "
376- f"mismatches={ total_mismatches } lob_known= { total_lob_known } "
378+ f"mismatches={ total_mismatches } "
377379 f"missing_olr={ total_missing_olr } extra_olr={ total_missing_lm } "
378380 f"{ tail_str } "
379381 f"lm_total={ lm_count } olr_total={ olr_count } "
@@ -391,7 +393,6 @@ def main():
391393 print (f" Total validated: { total_validated } " , flush = True )
392394 print (f" Matched: { total_matched } " , flush = True )
393395 print (f" Mismatches: { total_mismatches } " , flush = True )
394- print (f" LOB known issues: { total_lob_known } " , flush = True )
395396 print (f" Missing from OLR: { total_missing_olr } " , flush = True )
396397 print (f" Extra in OLR: { total_missing_lm } " , flush = True )
397398 if total_tail_olr or total_tail_lm :
@@ -404,13 +405,8 @@ def main():
404405 sys .exit (1 )
405406 else :
406407 print ("\n RESULT: PASS" , flush = True )
407- qualifiers = []
408- if total_lob_known > 0 :
409- qualifiers .append (f"{ total_lob_known } known LOB issues" )
410408 if total_tail_olr + total_tail_lm > 0 :
411- qualifiers .append (f"{ total_tail_olr + total_tail_lm } tail events" )
412- if qualifiers :
413- print (f" ({ ', ' .join (qualifiers )} )" , flush = True )
409+ print (f" ({ total_tail_olr + total_tail_lm } tail events)" , flush = True )
414410 sys .exit (0 )
415411
416412
0 commit comments