hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r1365883 - in /hadoop/common/branches/branch-1: CHANGES.txt src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockSender.java
Date Thu, 26 Jul 2012 04:49:15 GMT
Author: szetszwo
Date: Thu Jul 26 04:49:15 2012
New Revision: 1365883

URL: http://svn.apache.org/viewvc?rev=1365883&view=rev
Log:
HDFS-2751. Backport: Datanode may incorrectly drop OS cache behind reads even for short reads.
 Contributed by Brandon Li

Modified:
    hadoop/common/branches/branch-1/CHANGES.txt
    hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockSender.java

Modified: hadoop/common/branches/branch-1/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/CHANGES.txt?rev=1365883&r1=1365882&r2=1365883&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1/CHANGES.txt Thu Jul 26 04:49:15 2012
@@ -120,6 +120,9 @@ Release 1.2.0 - unreleased
     HADOOP-8606. FileSystem.get may return the wrong filesystem (Daryn Sharp 
     via bobby)
 
+    HDFS-2751. Backport: Datanode may incorrectly drop OS cache behind reads
+    even for short reads.  (Brandon Li via szetszwo)
+
 Release 1.1.0 - unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockSender.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockSender.java?rev=1365883&r1=1365882&r2=1365883&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockSender.java
(original)
+++ hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockSender.java
Thu Jul 26 04:49:15 2012
@@ -207,7 +207,7 @@ class BlockSender implements java.io.Clo
    * close opened files.
    */
   public void close() throws IOException {
-    if (blockInFd != null && shouldDropCacheBehindRead) {
+    if (blockInFd != null && shouldDropCacheBehindRead && isLongRead()) {
       // drop the last few MB of the file from cache
       try {
         NativeIO.posixFadviseIfPossible(blockInFd, lastCacheDropOffset, offset



Mime
View raw message