Hongjiang Zhang has posted comments on this change. ( http://gerrit.cloudera.org:8080/17773 )
Change subject: KUDU-1260: Fix prefetching bug on Java scanner ...................................................................... Patch Set 11: (1 comment) > Patch Set 11: > > (1 comment) > > I'd expect that with an alternative approach canBeIgnored() method would be > gone, but it seems the that's not the case? No. We use compareandset to replace blockingqueue, then there will be at most one prefetching scan request, but we still expect two concurrent scan requests: one normal scan request and another chained prefetching scan request, to accellerate RPC speed. The tserver will response to hasMore=false for only of the two scan requests, another scan request will see error. In my test environment, I found the "scanner not found" does not always happen, but it occurs sometimes. http://gerrit.cloudera.org:8080/#/c/17773/11/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduScanner.java File java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduScanner.java: http://gerrit.cloudera.org:8080/#/c/17773/11/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduScanner.java@671 PS11, Line 671: Deferred<RowResultIterator> prefetcherDeferred = client.scanNextRows(AsyncKuduScanner.this) : .addCallbacks(gotNextRow, nextRowErrback()); : if (!cachedPrefetcherDeferred.compareAndSet(null, prefetcherDeferred)) { : LOG.info("Skip one prefetching because two consecutive prefetching scan occurs"); : } > Is this about to start concurrent data fetching anyways? Probably, that's If cachedPrepetcherDeffered's value is null, which means no prefetching, then here add a new prefetching. But if it already has a value instead of null, it means the previous rpc has not finished, then here will ignore this prefetching RPC. I need to change the log message "consecutive" to "concurrent". -- To view, visit http://gerrit.cloudera.org:8080/17773 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I853a041d86c75ec196d7d4ff45af4673c5c5f5cd Gerrit-Change-Number: 17773 Gerrit-PatchSet: 11 Gerrit-Owner: Hongjiang Zhang <hongjizh...@ebay.com> Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Grant Henke <granthe...@apache.org> Gerrit-Reviewer: Hongjiang Zhang <hongjizh...@ebay.com> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Comment-Date: Thu, 09 Sep 2021 07:44:35 +0000 Gerrit-HasComments: Yes