Re: Recover After Crash
Date: Thu, 14 Sep 2000 13:38:22 +0400
Message-ID: <B5E6854E.3B79%kluev_at_stalker.-deIete-.gamma.ru>
In Article 8postb$cvc$13$1_at_news.t-online.com, Carl Rosenberger wrote:
>> This means that transaction should be opened for the whole >> period when user works with document - it could be hours.
>
> Where is the problem?
Transaction is per session (connect), right? If user will open ten documents we will have to open 10 connections. Connection resources are limited, we can't afford it. More than that, see below.
>> 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.
>
> This depends on the isolation level you are using.
> "Read Committed" is what you should be using.
> In this case only committed data is seen by other people.
> There is some good information on isolation levels in the Oracle
> documentation. Search for "phantom".
Thanks. I will search.
> 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.
It is almost the same as:
- When user opens document, status is set and program periodically
updates the time stamp field of the document entry in the table.
- When someone tries to open document it checks not only status, but ensures that time-stamp field is not expired.
> You can also use Oracles proprietary Connection-ID but I am sorry not to
> have this at hand.
-- Michael Kluev. PS. Remove "-delete-." part of my e-mail address to reply.Received on Thu Sep 14 2000 - 11:38:22 CEST