jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1494065 - /jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MongoMK.java
Date Tue, 18 Jun 2013 08:20:28 GMT
Author: mreutegg
Date: Tue Jun 18 08:20:28 2013
New Revision: 1494065

URL: http://svn.apache.org/r1494065
Log:
OAK-619 Lock-free MongoMK implementation
- Start background thread in a final step to avoid NPE

Modified:
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MongoMK.java

Modified: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MongoMK.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MongoMK.java?rev=1494065&r1=1494064&r2=1494065&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MongoMK.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MongoMK.java
Tue Jun 18 08:20:28 2013
@@ -248,12 +248,6 @@ public class MongoMK implements MicroKer
     }
     
     void init() {
-        backgroundThread = new Thread(
-                new BackgroundOperation(this, isDisposed),
-                "MongoMK background thread");
-        backgroundThread.setDaemon(true);
-        backgroundThread.start();
-
         headRevision = newRevision();
         Node n = readNode("/", headRevision);
         if (n == null) {
@@ -266,6 +260,11 @@ public class MongoMK implements MicroKer
             // initialize branchCommits
             branches.init(store, clusterId);
         }
+        backgroundThread = new Thread(
+                new BackgroundOperation(this, isDisposed),
+                "MongoMK background thread");
+        backgroundThread.setDaemon(true);
+        backgroundThread.start();
     }
     
     /**



Mime
View raw message