Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix flakyness in citus_split_shard_by_split_points_deferred_drop
In CI we would sometimes get this failure: ```diff -- The original shard is marked for deferred drop with policy_type = 2. -- The previous shard should be dropped at the beginning of the second split call SELECT * from pg_dist_cleanup; record_id | operation_id | object_type | object_name | node_group_id | policy_type -----------+--------------+-------------+--------------------------------------------------------------------------+---------------+------------- + 60 | 778 | 3 | citus_shard_split_slot_18_21216_778 | 16 | 0 512 | 778 | 1 | citus_split_shard_by_split_points_deferred_schema.table_to_split_8981001 | 16 | 2 -(1 row) +(2 rows) ``` Replication slots sometimes cannot be deleted right away. Which is hard to resolve, but luckily we can filter these cleanup records out easily by filtering by policy_type. While debugging this issue I learnt that we did not use GetNextCleanupRecordId in all places where we created cleanup records. This caused test failures when running tests multiple times, when they set citus.next_cleanup_record_id. So this PR fixes that too.
- Loading branch information