Skip to content

KAFKA-19451: fix flaky test RemoteIndexCacheTest.testCacheEntryIsDeletedOnRemoval() #20085

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

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

DL1231
Copy link
Contributor

@DL1231 DL1231 commented Jul 2, 2025

Problem Description
In the RemoteIndexCache.cleanup() method, the asynchronous invocation of index.deleteIfExists() may cause a conflict. When the getIndexFileFromRemoteCacheDir() method is executed, it utilizes Files.walk() to traverse all files in the directory path. If index.deleteIfExists() is triggered during this traversal, a NoSuchFileException will be thrown.

Solution
To resolve this issue, ensure that index.deleteIfExists() has been fully executed before invoking getIndexFileFromRemoteCacheDir().

@github-actions github-actions bot added triage PRs from the community tests Test fixes (including flaky tests) storage Pull requests that target the storage module small Small PRs labels Jul 2, 2025
@DL1231 DL1231 changed the title KAFKA-19451: fix flaky test RemoteIndexCacheTest.testCacheEntryIsDele… KAFKA-19451: fix flaky test RemoteIndexCacheTest.testCacheEntryIsDeletedOnRemoval() Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-approved small Small PRs storage Pull requests that target the storage module tests Test fixes (including flaky tests) triage PRs from the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants