Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 1 of 1 total
Thread TableWriteLockTimeOut
Tue, Oct 12 2021 8:37 AMPermanent Link

Danie van Eeden

Hi,

we have been catching a DBISAM exception in the event that the Write Lock Timeout is reached (e.g. 90s and not achieving a lock, we would catch the DBISAM exception and trigger some logic - whether that be a retry or other). This is through the use of a local session.

We recently upgraded (it seems the changes in 4.45 are related). As it stands the timeout is never reached, and the lock mechanism "keeps trying" and never times out.

Debugging got me to

TDBISAMDatabaseLockManager.WriteLock

in dbisamen.pas

I may be totally wrong, but it seems the local variable

TempTotalWaitTime: Word;

is wrapping when the Wait Timeout on the EngineManager has been set to more than 65 seconds (or High(Word)).

This the condition

TempTotalWaitTime < TempTotalTimeout

is always true and the locking attempt continues.

Should the "word" be "integer"?

Or am I doing something else wrong / making the wrong assumptions in general?

Thanks in advance
Danie
Image