[
https://issues.apache.org/jira/browse/OAK-2120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Marcel Reutegger resolved OAK-2120.
-----------------------------------
Resolution: Fixed
Fix Version/s: 1.1
Done in revision http://svn.apache.org/r1627047
> Simplify BranchStates
> ---------------------
>
> Key: OAK-2120
> URL: https://issues.apache.org/jira/browse/OAK-2120
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: core
> Reporter: Marcel Reutegger
> Assignee: Marcel Reutegger
> Priority: Minor
> Fix For: 1.1
>
>
> Transitions between the various BranchStates are documented for each of the
> state classes in AbstractNodeStoreBranch. I'd like to simplify some of the
> states and remove transitions that can be expensive.
> E.g. Persisted.setRoot() may transition to Unmodified if the given root state
> equals the base state. This makes sense, but is unlikely to happen on a real
> life system. At least with the DocumentNodeStore the equals comparison of
> base and root in setRoot() can become rather expensive if there had been many
> branch commits already.
> I propose to remove the transition back to Unmodified. I don't see a
> compelling reason or requirement to perform this check at this stage. The
> branch could simply stay in the Persisted state and leave it up to the
> underlying NodeStore implementation to optimize the case where subsequent
> branch commits 'undo' previous changes.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)