markap14 commented on a change in pull request #5042: URL: https://github.com/apache/nifi/pull/5042#discussion_r625986521
########## File path: nifi-nar-bundles/nifi-hbase-bundle/nifi-hbase-processors/src/main/java/org/apache/nifi/hbase/GetHBase.java ########## @@ -370,18 +371,17 @@ public void onTrigger(final ProcessContext context, final ProcessSession session rowsPulledHolder.set(++rowsPulled); if (++rowsPulled % getBatchSize() == 0) { - session.commit(); + session.commitAsync(); } }); final ScanResult scanResults = new ScanResult(latestTimestampHolder.get(), cellsMatchingTimestamp); - if (lastResult == null || scanResults.getTimestamp() > lastResult.getTimestamp()) { + final ScanResult latestResult = lastResult.get(); + if (latestResult == null || scanResults.getTimestamp() > latestResult.getTimestamp()) { session.setState(scanResults.toFlatMap(), Scope.CLUSTER); - session.commit(); - - lastResult = scanResults; - } else if (scanResults.getTimestamp() == lastResult.getTimestamp()) { + session.commitAsync(() -> lastResult.set(scanResults)); Review comment: Yeah this is the same condition as ListS3. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org