steveloughran commented on code in PR #5832:
URL: https://github.com/apache/hadoop/pull/5832#discussion_r1280857264


##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/impl/prefetch/CachingBlockManager.java:
##########
@@ -494,19 +546,25 @@ private void addToCacheAndRelease(BufferData data, 
Future<Void> blockFuture,
     prefetchingStatistics.executorAcquired(
         Duration.between(taskQueuedStartTime, Instant.now()));
 
-    if (closed) {
+    if (isClosed()) {
       return;
     }
 
-    if (cachingDisabled.get()) {
+    final int blockNumber = data.getBlockNumber();
+    LOG.debug("Block {}: Preparing to cache block", blockNumber);
+
+    if (isCachingDisabled()) {

Review Comment:
   there's a .get() on the future...which blocks until the data is received. 
the checks on L577 are if caching changed during that time.
   
   added some more comments and reviewed/tuned log messages



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to