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

Julian Reschke commented on OAK-8141:
-------------------------------------

[~mreutegg], spotbug complains about Path.equals being called with String 
arguments. I think we need to fix two line in the tests:

{noformat}
Index: 
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java
===================================================================
--- 
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java
      (revision 1869653)
+++ 
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java
      (working copy)
@@ -952,7 +952,7 @@
         for (String id : Sets.newHashSet(readSet)) {
             doc = store.find(NODES, id);
             assertNotNull(doc);
-            if (doc.isSplitDocument() && !doc.getMainPath().equals("/")) {
+            if (doc.isSplitDocument() && !doc.getMainPath().equals(Path.ROOT)) 
{
                 fail("must not access previous document: " + id);
             }
         }
Index: 
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentSplitTest.java
===================================================================
--- 
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentSplitTest.java
  (revision 1869653)
+++ 
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentSplitTest.java
  (working copy)
@@ -725,7 +725,7 @@
         for (String id : Sets.newHashSet(readSet)) {
             doc = store.find(NODES, id);
             assertNotNull(doc);
-            if (doc.isSplitDocument() && !doc.getMainPath().equals("/")) {
+            if (doc.isSplitDocument() && !doc.getMainPath().equals(Path.ROOT)) 
{
                 fail("must not access previous document: " + id);
             }
         }
{noformat}

Should I open a ticket?

> Replace String path with custom data type
> -----------------------------------------
>
>                 Key: OAK-8141
>                 URL: https://issues.apache.org/jira/browse/OAK-8141
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: documentmk
>            Reporter: Marcel Reutegger
>            Assignee: Marcel Reutegger
>            Priority: Major
>             Fix For: 1.14.0
>
>         Attachments: OAK-8141.patch, OAK-8141.patch
>
>
> DocumentNodeState objects and other related data is currently identified with 
> a String path in the various caches in the DocumentNodeStore. Read benchmarks 
> like GetDeepNodeTest that only read data from memory are significantly slower 
> on a DocumentNodeStore compared to a SegmentNodeStore. In these kind of tests 
> the DocumentNodeStore is usually busy with String operations like 
> constructing the path for a child node or calculating the hash code for a 
> lookup in a cache.
> This issue is about a potential improvement that replaces the use of a plain 
> String for the path of a DocumentNodeState and use a custom Path type instead.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to