View Revisions: Issue #6685
Summary | 0006685: Purge Service recaptures an Insert for stranded data after record had been deleted | ||
---|---|---|---|
Revision | 2024-12-27 13:43 by pbelov | ||
Additional Information | Set up: two SymmetricDS engines with client-server push configuration using two catalogs on the same PostgreSQL database: qaserver catalog for SymmetricDS server engine qaclient catalog for SymmetricDS client engine SET routing.stale.dataid.gap.time.ms=8000 (8 seconds) SET Routing job to run every 5 seconds SET Push job to run every 4 seconds SET Purge Outgoing job to only run at midnight -- Table with test data: CREATE TABLE qaserver.atest_6685_stale_gap ( cl1key INTEGER NOT NULL, clVARCHAR500 VARCHAR(500) NOT NULL, PRIMARY KEY (cl1key) ); -- Test slow INSERT: BEGIN transaction; INSERT INTO qaserver.atest_6685_stale_gap VALUES( 44, '44slow'); SELECT pg_sleep(15); COMMIT transaction; -- Test slow UPDATE: BEGIN transaction; UPDATE qaserver.atest_6685_stale_gap SET clVARCHAR500= '44slow-updated44' where cl1key=44; SELECT pg_sleep(15); COMMIT transaction; -- Test slow DELETE: BEGIN transaction; DELETE FROM qaserver.atest_6685_stale_gap where cl1key=44; SELECT pg_sleep(15); COMMIT transaction; -- Compare data in tables: SELECT 'source' as tbl, * FROM qaserver.atest_6685_stale_gap UNION ALL SELECT 'target' as tbl, * FROM qaclient.atest_6685_stale_gap order by 1,2; -- Review batches and data entries: SELECT b.batch_id, case when b.status is null then 'UNrouted' else b.status end as status , d.* FROM qaserver.sym_data d left outer join qaserver.sym_data_event e on e.data_id = d.data_id left outer join qaserver.sym_outgoing_batch b on e.batch_id = b.batch_id WHERE table_name='atest_6685_stale_gap' and d.data_id >=6961 or d.data_id = (SELECT Max(data_id) FROM qaserver.sym_data where table_name<>'atest_6685_stale_gap' ) order by data_id desc ; |
||
Revision | 2024-12-23 19:36 by mdrouard | ||
Additional Information |