averma21 commented on a change in pull request #383:
URL: https://github.com/apache/jackrabbit-oak/pull/383#discussion_r740121152
##########
File path:
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/TraverseAndSortTask.java
##########
@@ -263,15 +269,21 @@ private synchronized void reset() {
}
private void sortAndSaveBatch() throws IOException {
- if (entryBatch.isEmpty()) {
- return;
+ synchronized (this) {
+ if (entryBatch.isEmpty()) {
+ return;
+ }
+ entryBatch.sort(comparator);
}
- entryBatch.sort(comparator);
Stopwatch w = Stopwatch.createStarted();
File newtmpfile = File.createTempFile("sortInBatch", "flatfile",
sortWorkDir);
long textSize = 0;
+ long size = entryBatch.size();
Review comment:
Removed synchronization.
--
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]