[ 
https://issues.apache.org/jira/browse/OFBIZ-3557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13040130#comment-13040130
 ] 

Jacques Le Roux edited comment on OFBIZ-3557 at 6/5/11 12:28 PM:
-----------------------------------------------------------------

Add a note about the duplicate link with OFBIZ-2353
=====================================================
Jacopo,

I just quickly read the 1st lines of your last comment, and I think it should 
be noted here the relation with OFBIZ-2353 (SequenceUtil may generate duplicate 
IDs in Load Balancing mode). Ha, I just see that this issue is marker as its 
duplicate. Not sure it's completly the case because, apart maybe the SELECT FOR 
UPDATE solution, the solutions proposed in OFBIZ-2353 do not guarantee enforced 
sequences.

Just noticed that [Adrian already reported it in a comment 
above|https://issues.apache.org/jira/browse/OFBIZ-3557?focusedCommentId=12870058&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12870058].
 Anyway I already removed the duplicate lin

      was (Author: jacques.le.roux):
    Jacopo,

I just quickly read the 1st lines of your last comment, and I think it should 
be noted here the relation with OFBIZ-2353 (SequenceUtil may generate duplicate 
IDs in Load Balancing mode). Ha, I just see that this issue is marker as its 
duplicate. Not sure it's completly the case because, apart maybe the SELECT FOR 
UPDATE solution, the solutions proposed in OFBIZ-2353 do not guarantee enforced 
sequences.
  
> 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 09.04, SVN trunk
>            Reporter: Wickersheimer Jeremy
>         Attachments: OFBIZ-3557-1.patch, OFBIZ-3557-2.patch
>
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to