Skip to content

Fix pipe idempotent IT setup synchronization - #18363

Open
Caideyipi wants to merge 1 commit into
apache:masterfrom
Caideyipi:fix/pipe-idempotent-precondition-sync
Open

Fix pipe idempotent IT setup synchronization#18363
Caideyipi wants to merge 1 commit into
apache:masterfrom
Caideyipi:fix/pipe-idempotent-precondition-sync

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

Fix the remaining setup race in IoTDBPipeIdempotentIT after #18316.

The pipe applies configuration events asynchronously. Waiting for the initial database snapshot does not guarantee that the statements in beforeSqlList (for example, CREATE USER) have reached the receiver. The test can therefore create the receiver-side idempotent conflict too early and fail with errors such as User newUser does not exist.

Queue a database marker after the setup statements and wait until it is visible on the receiver before creating the conflict. Queue a second marker after the conflict to verify that the pipe continues processing subsequent events.

Tests

  • mvn spotless:check -pl integration-test -P with-integration-tests
  • mvn '-Ddevelocity.off=true' -P 'with-integration-tests,MultiClusterIT2DualTableManualEnhanced' -pl integration-test -am '-DskipUTs' '-DintegrationTest.forkCount=1' '-Dit.test=IoTDBPipeIdempotentIT#testTableAlterUserIdempotent3' '-Dfailsafe.failIfNoSpecifiedTests=false' verify

This PR has:

  • been self-reviewed.
  • added comments explaining the synchronization point.
  • modified an existing integration test to cover the race.
  • been tested in a local dual-cluster IoTDB environment.

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.

1 participant