Subject Re: [firebird-support] POST_EVENT race conditions?
Author Helen Borrie
At 06:23 PM 17/08/2006, you wrote:
>Running FBv1.53 db.
>One of my tables has an after insert trigger that contains a POST_EVENT.
>Running on the same server as my database is an NT service that wakes
>up in response to the event (I'm using IBO v4.3Aa) and retrieves all
>the recent rows. Each row contains a timestamp and I ask for all rows
>added in the last 5 minutes.
>The problem: Sometimes, when I respond to the event the most recent
>row is not returned even though I know it must have been added in
>order to post the event. I've checked my code + logic and cannot find
>anything wrong, so the only thing I can think of is that my service is
>responding before FB has time to fully write/index/? the record. I
>think this is unlikely, but I cannot think of anything else.
>Is that remotely possible? My server is a dual opteron,(FB
>affinity=1) if that makes any difference to the timing aspects.

All the things Alan said, plus figure out whether your service query
is actually running in a transaction that can see sufficiently recent
committed work, e.g. if the service app is using tiConcurrency and
Autocommit, it won't see anything that was committed since it began
its session...