Subject | Re: [firebird-support] Some feedback of my 2.5 experience |
---|---|
Author | Ann Harrison |
Post date | 2011-06-03T16:32:03Z |
Norm,
a record with no ID will never be inserted.
they always use the same generator, that trigger could easily create duplicates.
update, you change is not going to succeed until the transaction
that created the conflict commits and you start a new transaction.
With NO_WAIT, you can happily burn cycles by rolling back and
retrying over and over and over, but you'll just get the error until the
other transaction completes. With WAIT, you may have the appearance
of a hang, but at least you're not burning cycles and blocking other
useful work.
Good luck,
Ann
>>> And this on insertion of new support incidents:...
>>>
>>> IF (NEW.ID IS NULL) THEN
>>> NEW.ID = GEN_ID(GEN_CUSTOMERINCIDENTS_ID,0);
>>>
>That may be true, but the primary key index will reject a null primary key, so
> 1. There will be an ID present when the record is INSERTed.
a record with no ID will never be inserted.
>That depends entirely on how keys are generated in the normal case. Unless
> 2. The ID will be "in sequence" with the application, so no chance of a
> duplicate ID being used.
they always use the same generator, that trigger could easily create duplicates.
>The reason I recommend using WAIT is that if there is a conflicting
>>> BTW, I use no_wait for all my transactions, so I usually get
>>> a deadlock exception rather than a hang.
> What does the application do when it gets a deadlock exception? Does it
> rollback and try again? Is it possible that more than two transactions
> are involved and the deadlock is actually, a deadly embrace?
update, you change is not going to succeed until the transaction
that created the conflict commits and you start a new transaction.
With NO_WAIT, you can happily burn cycles by rolling back and
retrying over and over and over, but you'll just get the error until the
other transaction completes. With WAIT, you may have the appearance
of a hang, but at least you're not burning cycles and blocking other
useful work.
>It may be a 2.5 issue, or it may be a huge number of unsuccessful retries.
>>> If it was just a deadlock, surely I should be able to at least get to
> the
>>> monitoring tables? And into other tables in the database that are not
>>> locked up?
> I would assume this to be the case. But as you said earlier, you are on
> 2.5 and there are a couple of "complaints" about 2.5 on this list at the
> moment. If there is a 2.5 problem, maybe you are hitting it.
>
Good luck,
Ann