[jira] [Commented] (OAK-1953) Oak console on MongoMK fails with NPE

2016-05-10 Thread Julian Reschke (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-1953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15278011#comment-15278011
 ] 

Julian Reschke commented on OAK-1953:
-

Fixed LastRevRecoverAgent for 1.0 in http://svn.apache.org/r1743164

> Oak console on MongoMK fails with NPE
> -
>
> Key: OAK-1953
> URL: https://issues.apache.org/jira/browse/OAK-1953
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: core, documentmk, mongomk, rdbmk, run
>Affects Versions: 1.0.30
>Reporter: Marcel Reutegger
>Assignee: Marcel Reutegger
> Fix For: 1.1.0, 1.0.31
>
>
> The exception is:
> {noformat}
> Apache Jackrabbit Oak 1.1-SNAPSHOT
> Exception in thread "main" java.lang.NullPointerException: Lease End Time not 
> set
>   at 
> com.google.common.base.Preconditions.checkNotNull(Preconditions.java:209)
>   at 
> org.apache.jackrabbit.oak.plugins.document.ClusterNodeInfoDocument.getLeaseEndTime(ClusterNodeInfoDocument.java:41)
>   at 
> org.apache.jackrabbit.oak.plugins.document.LastRevRecoveryAgent.recover(LastRevRecoveryAgent.java:81)
>   at 
> org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.checkLastRevRecovery(DocumentNodeStore.java:425)
>   at 
> org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.(DocumentNodeStore.java:404)
>   at 
> org.apache.jackrabbit.oak.plugins.document.DocumentMK$Builder.getNodeStore(DocumentMK.java:582)
>   at org.apache.jackrabbit.oak.console.Console.main(Console.java:72)
>   at org.apache.jackrabbit.oak.run.Main.main(Main.java:118)
> {noformat}
> The document in the clusterNodes collection looks like this:
> {noformat}
> {
>   "_id" : "1",
>   "state" : null,
>   "leaseEnd" : null,
>   "instance" : "/Users/mreutegg/test",
>   "machine" : "mac:685b35b878ea",
>   "recoveryLock" : null,
>   "info" : "id: 1,\nstartTime: 1404725920370,\nmachineId: 
> mac:685b35b878ea,\ninstanceId: /Users/mreutegg/test,\npid: 40619,\nuuid: 
> 5cca6177-1062-441c-a86b-ec7bf848917d,\nreadWriteMode: null,\nstate: 
> NONE,\nrevLock: NONE",
>   "_modCount" : NumberLong(52)
> }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OAK-1953) Oak console on MongoMK fails with NPE

2014-07-07 Thread Marcel Reutegger (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-1953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14053656#comment-14053656
 ] 

Marcel Reutegger commented on OAK-1953:
---

The 'leaseEnd' in clusterNodes is correctly set to null. This happens when the 
DocumentNodeStore is shut down. It indicates that there is currently no oak 
cluster node using clusterId 1.

The oak-run console uses the DocumentNodeStore is a special way, because 
oak-run allows you to pass a clusterId. Usually a DocumentNodeStore is 
constructed without an explicit clusterId and the lease mechanism determines 
one. Acquiring a lease automatically updates the leaseEnd and the following 
recovery mechanism works.

With an explicit clusterId, no lease is acquired and the leaseEnd is left as 
is. The recovery code then tries to access the leaseEnd even though recovery is 
not needed at all.

The recovery code should be updated and we should probably also consider 
changing the console default behavior for the clusterId. With an explicit 
default clusterId of 1, it may happen that two oak instances run with the same 
clusterId. I think it would be better if the default clusterId was 0, which 
means it is automatically determined.

 Oak console on MongoMK fails with NPE
 -

 Key: OAK-1953
 URL: https://issues.apache.org/jira/browse/OAK-1953
 Project: Jackrabbit Oak
  Issue Type: Bug
  Components: core, mongomk, run
Affects Versions: 1.0
Reporter: Marcel Reutegger
Assignee: Marcel Reutegger

 The exception is:
 {noformat}
 Apache Jackrabbit Oak 1.1-SNAPSHOT
 Exception in thread main java.lang.NullPointerException: Lease End Time not 
 set
   at 
 com.google.common.base.Preconditions.checkNotNull(Preconditions.java:209)
   at 
 org.apache.jackrabbit.oak.plugins.document.ClusterNodeInfoDocument.getLeaseEndTime(ClusterNodeInfoDocument.java:41)
   at 
 org.apache.jackrabbit.oak.plugins.document.LastRevRecoveryAgent.recover(LastRevRecoveryAgent.java:81)
   at 
 org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.checkLastRevRecovery(DocumentNodeStore.java:425)
   at 
 org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.init(DocumentNodeStore.java:404)
   at 
 org.apache.jackrabbit.oak.plugins.document.DocumentMK$Builder.getNodeStore(DocumentMK.java:582)
   at org.apache.jackrabbit.oak.console.Console.main(Console.java:72)
   at org.apache.jackrabbit.oak.run.Main.main(Main.java:118)
 {noformat}
 The document in the clusterNodes collection looks like this:
 {noformat}
 {
   _id : 1,
   state : null,
   leaseEnd : null,
   instance : /Users/mreutegg/test,
   machine : mac:685b35b878ea,
   recoveryLock : null,
   info : id: 1,\nstartTime: 1404725920370,\nmachineId: 
 mac:685b35b878ea,\ninstanceId: /Users/mreutegg/test,\npid: 40619,\nuuid: 
 5cca6177-1062-441c-a86b-ec7bf848917d,\nreadWriteMode: null,\nstate: 
 NONE,\nrevLock: NONE,
   _modCount : NumberLong(52)
 }
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)