[
https://issues.apache.org/jira/browse/OAK-585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13564137#comment-13564137
]
Mete Atamel commented on OAK-585:
---------------------------------
I see three fixes that could help for this from easy to hard:
1- Check whether headRevId has been updated before saving nodes and commits in
CommitCommand. This would eliminate most (but not all) garbage.
2- When conflictingCommitsExist returns false, we currently still mark commit
as failed and retry internally. Instead, we should try to adjust
revision/baseRevision ids of commits and nodes accordingly.
3- Currently conflictingCommitsExist only checks for affectedPaths for conflict
but sometimes this results in false positives. For example, if we have commit1
+/a and commit2 +/b, there's no conflict but conflictingCommitsExist thinks
that there's a conflict because both commits will have / in their affected
paths. This could be improved to further reduce conflicts.
> Reduce cost of commit retry
> ---------------------------
>
> Key: OAK-585
> URL: https://issues.apache.org/jira/browse/OAK-585
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: mongomk
> Affects Versions: 0.6
> Reporter: Marcel Reutegger
>
> MongoMK currently has a retry mechanism when it commits changes. Its main
> purpose is to make sure the headRevId in the sync collection is updated
> consistently and concurrent conflicting commits are detected. Under higher
> concurrency it may happen that commits are retried multiple times, even when
> commits are non-conflicting. In this case its only about consistently
> updating the headRevId. When this happens the commit will get a new revision
> and the nodes of the commit are written again with the new revision, even
> though no changes to the nodes are needed. Only the revision needed an update.
> The cost of a retry should be reduced in this case. At least a commit retry
> should not leave garbage in the nodes and commits collections.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira