You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Michael Dürig (JIRA)" <ji...@apache.org> on 2015/10/02 11:11:27 UTC

[jira] [Commented] (OAK-3460) Progress logging for RepositorySidegrade

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

Michael Dürig commented on OAK-3460:
------------------------------------

Patch looks good to me. Note that wrapping of node states is notoriously difficult though regarding correctness and performance of {{compareAgainstBaseState}} and {{equals}}. The former seems fine, the latter is missing though and I would propose something like:

{code}
    @Override
    public boolean equals(Object other) {
        if (other instanceof ReportingNodeState) {
            return delegate.equals(((ReportingNodeState) other).delegate);
        } else {
            return delegate.equals(other);
        }
    }
{code}

This will still have some performance implications when a {{ReportingNodeState}} is passed to the equals method of e.g. {{SegmentNodeState}} as it will fall back to {{AbstractNodeState#equals}} in that case. I thinks this is fine, but we should but a note to that respect into the Javadoc of {{ReportingNodeState}}. 

Regarding {{ReportingNodeStateTest}}, it would be good to have a test case there covering {{compareAgainstBaseState}} in the recursive case (i.e. where a tree of several levels is traversed). 

> Progress logging for RepositorySidegrade
> ----------------------------------------
>
>                 Key: OAK-3460
>                 URL: https://issues.apache.org/jira/browse/OAK-3460
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: upgrade
>    Affects Versions: 1.0.21, 1.3.6, 1.2.6
>            Reporter: Julian Sedding
>            Assignee: Julian Sedding
>         Attachments: OAK-3460.patch
>
>
> Currently the RepositorySidegrade (aka NodeStore to NodeStore copy) has no progress logging. RepositoryUpgrade logs a message every 10'000th node. It would be nice if RepositorySidegrade did the same.



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