SOLR-7659: Rename and reorganize DirectoryFileStream.releaseCommitPointAndExtendReserve.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1684808 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shawn Heisey 2015-06-11 03:40:25 +00:00
parent 0471353922
commit a5492247f3
2 changed files with 10 additions and 6 deletions

View File

@ -153,6 +153,10 @@ Other Changes
* SOLR-7634: Upgrade Jetty to 9.2.11.v20150529 (Bill Bell, shalin)
* SOLR-7659: Rename releaseCommitPointAndExtendReserve in DirectoryFileStream
to extendReserveAndReleaseCommitPoint, and reverse the code to match.
(shalin, Shawn Heisey)
================== 5.2.1 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release

View File

@ -1368,15 +1368,15 @@ public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAw
}
}
protected void releaseCommitPointAndExtendReserve() {
protected void extendReserveAndReleaseCommitPoint() {
if(indexGen != null) {
//release the commit point as the write is complete
delPolicy.releaseCommitPoint(indexGen);
//Reserve the commit point for another 10s for the next file to be to fetched.
//We need to keep extending the commit reservation between requests so that the replica can fetch
//all the files correctly.
delPolicy.setReserveDuration(indexGen, reserveCommitDuration);
//release the commit point as the write is complete
delPolicy.releaseCommitPoint(indexGen);
}
}
@ -1437,7 +1437,7 @@ public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAw
if (in != null) {
in.close();
}
releaseCommitPointAndExtendReserve();
extendReserveAndReleaseCommitPoint();
}
}
@ -1503,7 +1503,7 @@ public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAw
LOG.warn("Exception while writing response for params: " + params, e);
} finally {
IOUtils.closeQuietly(inputStream);
releaseCommitPointAndExtendReserve();
extendReserveAndReleaseCommitPoint();
}
}
}