[
https://issues.apache.org/jira/browse/OAK-2472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15058425#comment-15058425
]
Mason Wolf commented on OAK-2472:
---------------------------------
If you look at the attached spec from OAK-2220 (see
https://issues.apache.org/jira/secure/attachment/12693084/oak-atomic-counter.md)
it specifically mentions fields like ":oak-counter-uuid1" so that you can have
many increments at one time.
That said, if thread1 sets oak:increment to 1 and thread2 simultaneously sets
oak:increment to 2, then regardless of which order they actually commit in,
since oak:increment is never actually saved, but just used to update
oak:counter, I think the result will always be oak:counter+=3. Before your
atomic counter was provided, the final version of our counted field would
either be +1 or +2 depending on the order of the commit.
For non-clustered environments, I think this is sufficient, Laurie.
If the same code I wrote based on OAK-2220 will be sufficient once OAK-2472 is
finished, then I'm done on my end, and thank you.
> Add support for atomic counters on cluster solutions
> ----------------------------------------------------
>
> Key: OAK-2472
> URL: https://issues.apache.org/jira/browse/OAK-2472
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.3.0
> Reporter: Davide Giannella
> Assignee: Davide Giannella
> Labels: scalability
> Fix For: 1.4
>
> Attachments: atomic-counter.md
>
>
> As of OAK-2220 we added support for atomic counters in a non-clustered
> situation.
> This ticket is about covering the clustered ones.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)