Subject | Re: [ib-support] wait transactions and rollback |
---|---|
Author | Ann W. Harrison |
Post date | 2002-06-25T19:30:26Z |
Woody,
locks the record before presenting data to the user, it avoids
making the user rethink his problem. You're quite right also
when you point out that this particular issue, updating a counter,
doesn't require any real subtlety. I don't understand what
Danny means when he says:
to implement a random increment generator. If the problem is
the other way around - that an abandoned transaction would leave
a hole in the sequence (1,2,whoops!,4,5), that's a potential
problem for almost any solution except one that actually serializes
updates, or in this case, inserts.
transaction! That problem occurs only because someone has
been lazy about closing transactions.
and consistency. Maybe for a beginner doing baby applications,
serialized transactions that alter only one record each are ok.
[Calm yourself Ann... crawl back into your cave.]
Anyway, if I were Danny, I'd use a generator and get out of
this whole discussion.
Regards,
Ann
www.ibphoenix.com
We have answers.
>I agree with this type of solution, however, reading data isn't really anYes of course writing is the problem, but if the application
>issue, only modifying it, except in specific cases.
locks the record before presenting data to the user, it avoids
making the user rethink his problem. You're quite right also
when you point out that this particular issue, updating a counter,
doesn't require any real subtlety. I don't understand what
Danny means when he says:
> I think too that generator is not a good option because theGenerators are generally consecutive, though you could choose
> counters would be consecutive 1,2,3,4,5.
to implement a random increment generator. If the problem is
the other way around - that an abandoned transaction would leave
a hole in the sequence (1,2,whoops!,4,5), that's a potential
problem for almost any solution except one that actually serializes
updates, or in this case, inserts.
>Too many times I've seenAs you've said, once you've updated your records, end the
>posts that say something like "My app hangs until the other user releases
>their transaction."
transaction! That problem occurs only because someone has
been lazy about closing transactions.
>Using wait transactions can cause just as serious aFair enough... I'm something of a fanatic on concurrency
>problem for some applications as using no-wait transactions. It's all in
>what you are trying to do. What works best in one situation may not work in
>others. DIfferent situations require different and sometimes unique
>solutions.
and consistency. Maybe for a beginner doing baby applications,
serialized transactions that alter only one record each are ok.
[Calm yourself Ann... crawl back into your cave.]
Anyway, if I were Danny, I'd use a generator and get out of
this whole discussion.
Regards,
Ann
www.ibphoenix.com
We have answers.