You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "void-ptr974 (via GitHub)" <gi...@apache.org> on 2026/08/12 14:52:14 UTC
[PR] [test] Stabilize remote log prefetch test [fluss]
void-ptr974 opened a new pull request, #3968:
URL: https://github.com/apache/fluss/pull/3968
## Summary
- pause the downloader fetch loop before checking recycled prefetch permits
- preserve the permit-count assertion while removing the scheduling race
Fixes #3460
## Root Cause
After the recycle callbacks release two permits, the downloader thread can immediately acquire one while polling the empty request queue. The test can therefore observe one available permit even though both permits were released correctly.
## Test Plan
- `mvn -pl fluss-client -am -Dtest=RemoteLogDownloaderTest#testPrefetchNum -Dsurefire.failIfNoSpecifiedTests=false test`
- repeated `RemoteLogDownloaderTest#testPrefetchNum` 10 times
- `mvn -pl fluss-client -am verify` (blocked by unrelated local JMX/RMI connection failures in `JMXServerTest` and `JMXReporterTest`)
--
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] [test] Stabilize RemoteLogDownloader prefetch test [fluss]
Posted by "Jackeyzhe (via GitHub)" <gi...@apache.org>.
Jackeyzhe commented on code in PR #3968:
URL: https://github.com/apache/fluss/pull/3968#discussion_r3775903798
##########
fluss-client/src/test/java/org/apache/fluss/client/table/scanner/log/RemoteLogDownloaderTest.java:
##########
@@ -93,13 +93,26 @@ void beforeEach() {
@Test
void testPrefetchNum() throws Exception {
RemoteFileDownloader remoteFileDownloader = new RemoteFileDownloader(1);
+ CountDownLatch fetchLoopBlocked = new CountDownLatch(1);
+ CountDownLatch continueFetchLoop = new CountDownLatch(1);
RemoteLogDownloader remoteLogDownloader =
new RemoteLogDownloader(
DATA1_TABLE_PATH.toString(),
conf,
remoteFileDownloader,
scannerMetricGroup,
- 10L);
+ 10L) {
+ @Override
+ void fetchOnce() throws Exception {
+ // Pause after all requests are scheduled so the loop cannot acquire a
+ // recycled permit before it is asserted below.
+ if (scannerMetricGroup.remoteFetchRequestCount().getCount() >= 5) {
Review Comment:
Nice fix, nit: I think extracting 5 as a named constant (e.g. EXPECTED_COUNT) or a variable would be reasonable
--
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] [test] Stabilize RemoteLogDownloader prefetch test [fluss]
Posted by "void-ptr974 (via GitHub)" <gi...@apache.org>.
void-ptr974 closed pull request #3968: [test] Stabilize RemoteLogDownloader prefetch test
URL: https://github.com/apache/fluss/pull/3968
--
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