[
https://issues.apache.org/jira/browse/OAK-6667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrei Dulceanu updated OAK-6667:
---------------------------------
Attachment: OAK-6667.patch
I took some inspiration from {{Compactor.CompactDiff}} and re-factored
{{StandbyDiff}} to adhere to goals set in description. [~frm], could you please
take a look at the patch?
> Refactor StandbyDiff for better clarity and understandability
> -------------------------------------------------------------
>
> Key: OAK-6667
> URL: https://issues.apache.org/jira/browse/OAK-6667
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: segment-tar, tarmk-standby
> Reporter: Andrei Dulceanu
> Assignee: Andrei Dulceanu
> Priority: Minor
> Labels: cold-standby
> Fix For: 1.7.8
>
> Attachments: OAK-6667.patch
>
>
> {{StandbyDiff}} still makes use of the {{logOnly}} property for deciding when
> to act upon node/property changes. The official documentation of {{logOnly}}
> states that it helps for
> {quote}
> /**
> * read-only traversal of the diff that has 2 properties: one is to log
> all
> * the content changes, second is to drill down to properly level, so that
> * missing binaries can be sync'ed if needed
> */
> {quote}
> but it's use is a bit misleading. The first call to {{StandbyDiff}} is always
> with {{logOnly==false}}, while subsequent calls are done with
> {{logOnly==true}}. Implementing {{StandbyDiff}} without this mechanism would
> result in better clarity and maintainability.
> Another minor improvement is to rename {{#binaryCheck}} methods and
> {{#readBinary}} to {{#fetchBinary}} and {{#fetchAndStoreBlob}} which is more
> appropriate to their purpose.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)