Skip to content

[fix][test]testRedirectOfGetCoordinatorInternalStats#19715

Merged
liangyepianzhou merged 2 commits intoapache:masterfrom
liangyepianzhou:xiangying/flaky-test/testRedirectOfGetCoordinatorInternalStats
Mar 9, 2023
Merged

[fix][test]testRedirectOfGetCoordinatorInternalStats#19715
liangyepianzhou merged 2 commits intoapache:masterfrom
liangyepianzhou:xiangying/flaky-test/testRedirectOfGetCoordinatorInternalStats

Conversation

@liangyepianzhou
Copy link
Contributor

Fix #18600

Motivation

Reason for test failure:

  1. Create 16 brokers and 3 transaction coordinator topics.
  2. The 3 transaction coordinator topics are assigned to broker-0.
  3. Because the admin is connected to broker-0, we do not hope the topics are assigned to broker-0.
  4. Recreate the 3 transaction coordinator topics.
  5. The topics are assigned to broker-0 again.
  6. Repeat execute steps 3,4,5
  7. Timeout

Modifications

Do not recreate the transaction coordinator topics.
Recreate an admin connect the broker which is not the owner of the transaction coordinator topics.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Mar 5, 2023
@liangyepianzhou liangyepianzhou self-assigned this Mar 5, 2023
new PartitionedTopicMetadata(NUM_PARTITIONS));
map = admin.lookups().lookupPartitionedTopic(SystemTopicNames.TRANSACTION_COORDINATOR_ASSIGN.toString());

for (int i = 0; map.containsValue(getPulsarServiceList().get(i).getBrokerServiceUrl()); i++) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not create a new admin connected to the broker who not contains the TXN coordinator?

@liangyepianzhou liangyepianzhou merged commit 42a65aa into apache:master Mar 9, 2023
@liangyepianzhou liangyepianzhou deleted the xiangying/flaky-test/testRedirectOfGetCoordinatorInternalStats branch March 9, 2023 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs ready-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky-test: AdminApiTransactionMultiBrokerTest.testRedirectOfGetCoordinatorInternalStats

2 participants