[
https://issues.apache.org/jira/browse/JCR-3573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13634071#comment-13634071
]
Marcel Reutegger commented on JCR-3573:
---------------------------------------
bq. i would prefer to have but a single save during the login
In almost all cases you still have a single save call. This is only a one time
cost when the .tokens node doesn't exist yet.
bq. looks a bit hacky, doesn't it?
Handling this race condition nicer, e.g. with JCR locking requires even more
calls, or did you have something else in mind?
> Improve token based login concurrency
> -------------------------------------
>
> Key: JCR-3573
> URL: https://issues.apache.org/jira/browse/JCR-3573
> Project: Jackrabbit Content Repository
> Issue Type: Improvement
> Components: jackrabbit-core
> Reporter: Marcel Reutegger
> Priority: Minor
> Attachments: JCR-3573.patch
>
>
> Currently TokenBasedAuthentication.createToken() is synchronized and
> therefore serializes creation of tokens repository wide.
> Removing the synchronization shows test failures because the .tokens node is
> created concurrently by multiple sessions. Instead of serializing the calls,
> we could also use an optimistic approach. See attached patch. All tests pass.
--
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