Skip to content

KAFAK-18451: Flaky RemoteLogManagerTest#testRLMOpsWhenMetadataIsNotReady#18520

Merged
showuon merged 2 commits intoapache:trunkfrom
FrankYang0529:KAFKA-18451
Jan 15, 2025
Merged

KAFAK-18451: Flaky RemoteLogManagerTest#testRLMOpsWhenMetadataIsNotReady#18520
showuon merged 2 commits intoapache:trunkfrom
FrankYang0529:KAFKA-18451

Conversation

@FrankYang0529
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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!

Signed-off-by: PoAn Yang <payang@apache.org>
@showuon
Copy link
Copy Markdown
Member

showuon commented Jan 15, 2025

Re-running CI.

@FrankYang0529
Copy link
Copy Markdown
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
@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 <showuon@gmail.com>
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 <showuon@gmail.com>
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 <showuon@gmail.com>
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