Re: Recover After Crash
Date: Wed, 13 Sep 2000 23:51:36 +0200
Message-ID: <8postb$cvc$13$1_at_news.t-online.com>
> > [Locking under Oracle crashsafe]
>> "select DOC_ID from DOCUMENT where DOC_ID = xxx for
>> update nowait"
> This means that transaction should be opened for the whole
> period when user works with document - it could be hours.
Where is the problem?
> I guess, this is not "good thing" to have transaction opened
> for so long. If I will modify other tables/rows of this table
> (while having transaction is opened), will my modifications
> be seen by elsewhom? I think not - this is not appropriate.
If you consider an open transaction a bad idea:
- Let the user insert a dataset into a timestamp table on the server.
- Select Sequence.currval to get the pkey of this dataset.
- Use this pkey to identify the lock on DOCUMENT
- Write some "High I am still there" information back to the server in
whatever time interval.
- Some Check-Code clears Dead-Locks.
- Store your "HiThere-ID" locally, so you can reuse it, so you don't wait
upon your own lock upon a crash.
You can also use Oracles proprietary Connection-ID but I am sorry not to have this at hand.
HTH.
Regards,
Carl
-- Carl Rosenberger db4o - database for objects - http://www.db4o.comReceived on Wed Sep 13 2000 - 23:51:36 CEST