You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Wickersheimer Jeremy (JIRA)" <ji...@apache.org> on 2010/03/17 18:51:27 UTC
[jira] Commented: (OFBIZ-3557) Enforced sequence does not work with
concurrent access
[ https://issues.apache.org/jira/browse/OFBIZ-3557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846500#action_12846500 ]
Wickersheimer Jeremy commented on OFBIZ-3557:
---------------------------------------------
While looking for a possible solution using SemaphoreService, i noticed that the semaphore / semaphoreWait / semaphoreSleep attributes are not copied in the ModelService clone constructor.
The result is that they are never used.
This happens in trunk and 09.04, i do not attach a patch all that is needed in ModelService is to add:
this.semaphore = model.semaphore;
this.semaphoreWait = model.semaphoreWait;
this.semaphoreSleep = model.semaphoreSleep;
in the clone constructor.
Then i think we can work around this JIRA issue by marking the storeOrder service (for example) to use the semaphores.
> Enforced sequence does not work with concurrent access
> ------------------------------------------------------
>
> Key: OFBIZ-3557
> URL: https://issues.apache.org/jira/browse/OFBIZ-3557
> Project: OFBiz
> Issue Type: Bug
> Components: framework
> Affects Versions: Release Branch 9.04, SVN trunk
> Reporter: Wickersheimer Jeremy
>
> There is a fundamental issue with enforced sequences (for orders, invoices, etc ..) and concurrency.
> For example if two users are creating an order at the same time one of them will see the creation fail with a PK error. The problem is that the "getNextXXXId" rely on the party accounting preference entity, but there is absolutely no guarantee that the last number in the sequence gets updated before another service can read it.
> This is at best very annoying when used only internally but may be unpractical for e-commerce sites.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.