Author: mreutegg
Date: Wed Sep 28 12:06:15 2016
New Revision: 1762635
URL: http://svn.apache.org/viewvc?rev=1762635&view=rev
Log:
OAK-4840: Incorrect branch commit value
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/NodeDocument.java
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/NodeDocument.java
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/NodeDocument.java?rev=1762635&r1=1762634&r2=1762635&view=diff
==============================================================================
---
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/NodeDocument.java
(original)
+++
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/NodeDocument.java
Wed Sep 28 12:06:15 2016
@@ -1962,8 +1962,10 @@ public final class NodeDocument extends
}
} else {
// branch commit (not merged)
- Revision branchCommit = Revision.fromString(commitValue);
- if (branchCommit.getClusterId() != context.getClusterId()) {
+ // read as RevisionVector, even though this should be
+ // a Revision only. See OAK-4840
+ RevisionVector branchCommit =
RevisionVector.fromString(commitValue);
+ if (branchCommit.getBranchRevision().getClusterId() !=
context.getClusterId()) {
// this is an unmerged branch commit from another cluster node,
// hence never visible to us
return false;