You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "yangshangqing95 (via GitHub)" <gi...@apache.org> on 2026/10/19 19:40:28 UTC
[PR] [client] Fix flaky prefetch permit assertion in RemoteLogDownloaderTest [fluss]
yangshangqing95 opened a new pull request, #4739:
URL: https://github.com/apache/fluss/pull/4739
### Purpose
Fix: #4738, #3460
`RemoteLogDownloaderTest.testPrefetchNum` intermittently fails because the background fetch thread may temporarily acquire a prefetch permit while polling an empty request queue.
As a result, the test may observe only one available permit after recycling two segments, even though there is no permit leak.
This PR addresses the test race without changing the production download scheduling behavior.
### Brief change log
- Call `fetchOnce()` explicitly to make prefetch scheduling deterministic during the capacity assertions.
- Verify that the prefetch limit is respected and queued downloads proceed after permits are recycled.
- Start the background downloader after the permit assertions to verify asynchronous file cleanup.
### Tests
Updated `RemoteLogDownloaderTest.testPrefetchNum` to verify:
- Only the configured number of segments can be prefetched.
- Additional requests remain queued until capacity becomes available.
- Recycling segments releases the expected number of permits.
- Download metrics and asynchronous file cleanup remain correct.
### API and Format
No changes.
### Documentation
Not applicable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [client] Fix flaky prefetch permit assertion in RemoteLogDownloaderTest [fluss]
Posted by "polyzos (via GitHub)" <gi...@apache.org>.
polyzos merged PR #4739:
URL: https://github.com/apache/fluss/pull/4739
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org