Subject | Re: What can cause "Transaction start failed. deadlock" in Firebird 2.0.3? |
---|---|
Author | Adam |
Post date | 2008-08-28T23:00:24Z |
--- In firebird-support@yahoogroups.com, "Antti Nivala"
<antti.nivala@...> wrote:
connection at the same moment in time?
back into the pool without commit or rollback (eg, you are trapping
exceptions when there is an issue in 3 or 4.
Adam
<antti.nivala@...> wrote:
>Are you 100% sure that two threads can not possibly grab the same
> Hi Vlad,
>
> > Is this threads share the same connection or its have own connections
> ?
>
> We are not using the same connection from two threads simultaneously,
> but for performance reasons, we are caching (pooling) connections.
> Another thread may pick the connection at a later time and start a new
> transaction.
>
> Whenever a thread needs to do something with the database, it performs
> the following steps:
>
> 1. Gets an existing connection from the pool (and removes it from the
> pool).
connection at the same moment in time?
>Are you 100% sure that a thread can not possibly return a connection
> 2. Starts a new transaction.
>
> 3. Executes the query.
>
> 4. Commits the transaction.
>
> 5. Puts the connection back to the pool.
back into the pool without commit or rollback (eg, you are trapping
exceptions when there is an issue in 3 or 4.
Adam