Skip to content

Align repair test assertions with TtlUpdate partition query - #3295

Open
Hashim1999164 wants to merge 1 commit into
linkedin:masterfrom
Hashim1999164:fix/mysql-repair-test-ttl-assertion
Open

Align repair test assertions with TtlUpdate partition query#3295
Hashim1999164 wants to merge 1 commit into
linkedin:masterfrom
Hashim1999164:fix/mysql-repair-test-ttl-assertion

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Aug 22, 2026

Copy link
Copy Markdown

Summary

testPutGetDeleteSequence asserted that any partition with foreign repair rows must appear in getPartitionsNeedRepair. That query only returns partitions that hold foreign TtlUpdateRequest rows, while getRepairRequestsExcludingHost also returns DeleteRequest rows. Random layouts with delete only rows then failed the assertion intermittently.

The test now asserts partition membership only when a foreign TtlUpdateRequest is present. Delete only partitions still remove and verify records, but they no longer require a shrinking partitionsNeedRepair set.

Fixes #3288

Test plan

  1. Compile int test sources for ambry mysql with Gradle compileIntTestJava.
  2. When MySQL is available, run MysqlRepairRequestsDbTest.testPutGetDeleteSequence repeatedly and confirm it stays stable.

getPartitionsNeedRepair only lists partitions with foreign TtlUpdateRequest rows, while getRepairRequestsExcludingHost also returns DeleteRequest rows. Assert membership only when a foreign TTL update is present.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky test: MysqlRepairRequestsDbTest.testPutGetDeleteSequence asserts a condition the query contract does not guarantee

1 participant