You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by ch...@apache.org on 2015/03/05 07:39:18 UTC
svn commit: r1664240 -
/jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexTracker.java
Author: chetanm
Date: Thu Mar 5 06:39:17 2015
New Revision: 1664240
URL: http://svn.apache.org/r1664240
Log:
OAK-2570 - Open indexes in IndexTracker non blocking way
Removed the 2 TODO. No code change done
- Use DirectoryReader.openIfChanged() - Not required as Index is only opened if there is a change in index data
- Concern around closing index taking time - Given that IndexTracker is now invoked from a BackgroundObserver this should not be a cause of concern now
Modified:
jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexTracker.java
Modified: jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexTracker.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexTracker.java?rev=1664240&r1=1664239&r2=1664240&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexTracker.java (original)
+++ jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexTracker.java Thu Mar 5 06:39:17 2015
@@ -92,7 +92,6 @@ class IndexTracker {
@Override
public void leave(NodeState before, NodeState after) {
try {
- // TODO: Use DirectoryReader.openIfChanged()
IndexNode index = IndexNode.open(path, root, after, cloner);
log.debug("Index found to be updated at [{}]. Reopening the IndexNode", path);
updates.put(path, index); // index can be null
@@ -112,8 +111,10 @@ class IndexTracker {
.putAll(filterValues(updates, notNull()))
.build();
- //TODO This might take some time as close need to acquire the
+ //This might take some time as close need to acquire the
//write lock which might be held by current running searches
+ //Given that Tracker is now invoked from a BackgroundObserver
+ //not a high concern
for (String path : updates.keySet()) {
IndexNode index = original.get(path);
try {