Author: frm
Date: Wed Jun 29 13:51:19 2016
New Revision: 1750638
URL: http://svn.apache.org/viewvc?rev=1750638&view=rev
Log:
OAK-3468 - Replace BackgroundThread with Scheduler
Add comments regarding the handling of background operations and hints to
further improvements.
Modified:
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/FileStore.java
Modified:
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/FileStore.java
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/FileStore.java?rev=1750638&r1=1750637&r2=1750638&view=diff
==============================================================================
---
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/FileStore.java
(original)
+++
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/FileStore.java
Wed Jun 29 13:51:19 2016
@@ -317,6 +317,12 @@ public class FileStore implements Segmen
lock = null;
}
+ // FIXME The following background operations are historically part of
+ // the implementation of the FileStore, but they should better be
+ // scheduled and invoked by an external agent. The code deploying the
+ // FileStore might have better insights on when and how these
background
+ // operations should be invoked. See also OAK-3468.
+
flushOperation = new PeriodicOperation(String.format("TarMK flush
thread [%s]", directory), 5, SECONDS, new Runnable() {
@Override
@@ -352,8 +358,6 @@ public class FileStore implements Segmen
});
- // FIXME OAK-3468 Replace BackgroundThread with Scheduler
- // Externalise these background operations
if (!readOnly) {
flushOperation.start();
diskSpaceOperation.start();