Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KAFAK-18451: Flaky RemoteLogManagerTest#testRLMOpsWhenMetadataIsNotReady #18520

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

FrankYang0529
Copy link
Member

@FrankYang0529 FrankYang0529 commented Jan 14, 2025

The REMOTE_LOG_MANAGER_TASK_INTERVAL_MS_PROP in RemoteLogManagerTest is 100 which is too small. If assertions verifyNoMoreInteractions can't run in 100ms, the scheduler will run RLMTask again and the case will fail.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@github-actions github-actions bot added core Kafka Broker tests Test fixes (including flaky tests) tiered-storage Related to the Tiered Storage feature small Small PRs labels Jan 14, 2025
Copy link
Member

@showuon showuon left a comment

Choose a reason for hiding this comment

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

LGTM, a minor comment left. Thanks for the fix!

Comment on lines 3718 to 3720
doReturn(true).when(remoteLogMetadataManager).isReady(any(TopicIdPartition.class));

CountDownLatch latch = new CountDownLatch(3); // there are 3 RLMTasks, so setting the count to 3
when(remoteLogMetadataManager.isReady(any(TopicIdPartition.class)))
Copy link
Member

Choose a reason for hiding this comment

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

I think L3718 is not needed because we want to use the mock in L3721, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I just copied and pasted setup function and didn't notice that. Thanks for catching it.

};
doReturn(true).when(remoteLogMetadataManager).isReady(any(TopicIdPartition.class));

CountDownLatch latch = new CountDownLatch(3); // there are 3 RLMTasks, so setting the count to 3
Copy link
Member

Choose a reason for hiding this comment

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

Nice catch!

Copy link
Member

@showuon showuon left a comment

Choose a reason for hiding this comment

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

LGTM!

@showuon
Copy link
Member

showuon commented Jan 15, 2025

Re-running CI.

@FrankYang0529
Copy link
Member Author

Hi @showuon, thanks for trigger CI again. There are some flaky test cases which are not related to this PR. I can't reproduce on my laptop as well.

@showuon showuon merged commit ae661de into apache:trunk Jan 15, 2025
7 of 9 checks passed
@FrankYang0529 FrankYang0529 deleted the KAFKA-18451 branch January 15, 2025 08:20
pranavt84 pushed a commit to pranavt84/kafka that referenced this pull request Jan 27, 2025
…ady (apache#18520)

The REMOTE_LOG_MANAGER_TASK_INTERVAL_MS_PROP in RemoteLogManagerTest is 100 which is too small. If assertions verifyNoMoreInteractions can't run in 100ms, the scheduler will run RLMTask again and the case will fail.

Reviewers: Luke Chen <[email protected]>
airlock-confluentinc bot pushed a commit to confluentinc/kafka that referenced this pull request Jan 27, 2025
…ady (apache#18520)

The REMOTE_LOG_MANAGER_TASK_INTERVAL_MS_PROP in RemoteLogManagerTest is 100 which is too small. If assertions verifyNoMoreInteractions can't run in 100ms, the scheduler will run RLMTask again and the case will fail.

Reviewers: Luke Chen <[email protected]>
manoj-mathivanan pushed a commit to manoj-mathivanan/kafka that referenced this pull request Feb 19, 2025
…ady (apache#18520)

The REMOTE_LOG_MANAGER_TASK_INTERVAL_MS_PROP in RemoteLogManagerTest is 100 which is too small. If assertions verifyNoMoreInteractions can't run in 100ms, the scheduler will run RLMTask again and the case will fail.

Reviewers: Luke Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Kafka Broker small Small PRs tests Test fixes (including flaky tests) tiered-storage Related to the Tiered Storage feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants