Re: How to change default entity sequencer increment of 10

2009-12-12 Thread David E Jones

That uses a separate transaction pretty far down in the sequence util code. So, 
no, there is no need to put it in a separate transaction higher up.

On the other hand, if you're using the current code and running into lots of 
conflicts it could be totally valid conflicts, or it could be that we could 
improve the code some how and mitigate the issue.

-David


On Dec 12, 2009, at 5:27 PM, Brett Palmer wrote:

> David,
> 
> We are at revision 806775 of the trunk.
> 
> We mostly use the sequencer through simple methods using the " " command.  I had assumed this was done in a separate transaction but is
> that not the case?  What is the recommended way to generate unique IDs for
> entities using simple methods?  Do we need to create separate services for
> getting the ID and call that in a separate transaction?
> 
> 
> Brett
> 
> 
> On Sat, Dec 12, 2009 at 2:44 PM, David E Jones  wrote:
> 
>> 
>> This is currently configured per entity. On the entity definition there is
>> a sequence-bank-size attribute you can use to increase this to 100 or
>> whatever.
>> 
>> BTW, which version of OFBiz are you using? Getting sequence IDs should be
>> in a separate transaction from your main transaction, but of course even
>> with a tiny transaction like that conflicts could occur.
>> 
>> -David
>> 
>> 
>> On Dec 12, 2009, at 11:26 AM, Brett Palmer wrote:
>> 
>>> We are running a mysql 5.x database with 4 applications servers on the
>> same
>>> db.  We use the GenericDelegator.getNextSeqId() a lot in our code and
>> simple
>>> methods.  The default is for the sequencer to increment by 10 but under
>>> heavy loads we are seeing the SequenceValueItem table get really hot with
>>> updates that lock.
>>> 
>>> We would like to avoid the frequency of locks on this table by increasing
>>> the increment from 10 to 100 or bigger.
>>> 
>>> Is this done in a configuration file?  I see a method
>>> GenericDelegator.getNextSeqId(seqName, staggerMax) that would probably
>> work
>>> but is this also available in a simple method.
>>> 
>>> Thanks,
>>> 
>>> 
>>> Brett
>> 
>> 



Re: How to change default entity sequencer increment of 10

2009-12-12 Thread Brett Palmer
David,

We are at revision 806775 of the trunk.

We mostly use the sequencer through simple methods using the " wrote:

>
> This is currently configured per entity. On the entity definition there is
> a sequence-bank-size attribute you can use to increase this to 100 or
> whatever.
>
> BTW, which version of OFBiz are you using? Getting sequence IDs should be
> in a separate transaction from your main transaction, but of course even
> with a tiny transaction like that conflicts could occur.
>
> -David
>
>
> On Dec 12, 2009, at 11:26 AM, Brett Palmer wrote:
>
> > We are running a mysql 5.x database with 4 applications servers on the
> same
> > db.  We use the GenericDelegator.getNextSeqId() a lot in our code and
> simple
> > methods.  The default is for the sequencer to increment by 10 but under
> > heavy loads we are seeing the SequenceValueItem table get really hot with
> > updates that lock.
> >
> > We would like to avoid the frequency of locks on this table by increasing
> > the increment from 10 to 100 or bigger.
> >
> > Is this done in a configuration file?  I see a method
> > GenericDelegator.getNextSeqId(seqName, staggerMax) that would probably
> work
> > but is this also available in a simple method.
> >
> > Thanks,
> >
> >
> > Brett
>
>


Re: How to change default entity sequencer increment of 10

2009-12-12 Thread David E Jones

This is currently configured per entity. On the entity definition there is a 
sequence-bank-size attribute you can use to increase this to 100 or whatever.

BTW, which version of OFBiz are you using? Getting sequence IDs should be in a 
separate transaction from your main transaction, but of course even with a tiny 
transaction like that conflicts could occur.

-David


On Dec 12, 2009, at 11:26 AM, Brett Palmer wrote:

> We are running a mysql 5.x database with 4 applications servers on the same
> db.  We use the GenericDelegator.getNextSeqId() a lot in our code and simple
> methods.  The default is for the sequencer to increment by 10 but under
> heavy loads we are seeing the SequenceValueItem table get really hot with
> updates that lock.
> 
> We would like to avoid the frequency of locks on this table by increasing
> the increment from 10 to 100 or bigger.
> 
> Is this done in a configuration file?  I see a method
> GenericDelegator.getNextSeqId(seqName, staggerMax) that would probably work
> but is this also available in a simple method.
> 
> Thanks,
> 
> 
> Brett



How to change default entity sequencer increment of 10

2009-12-12 Thread Brett Palmer
We are running a mysql 5.x database with 4 applications servers on the same
db.  We use the GenericDelegator.getNextSeqId() a lot in our code and simple
methods.  The default is for the sequencer to increment by 10 but under
heavy loads we are seeing the SequenceValueItem table get really hot with
updates that lock.

We would like to avoid the frequency of locks on this table by increasing
the increment from 10 to 100 or bigger.

Is this done in a configuration file?  I see a method
 GenericDelegator.getNextSeqId(seqName, staggerMax) that would probably work
but is this also available in a simple method.

Thanks,


Brett