Re: Why a long transaction cannot rollback?? (2)
Posted in 1997
In article <01bc4418$a31e3120$LocalHost@madeline>,
"Madeline Wu" <madeline@ms1.hinet.net> wrote:
>I test a long transaction in Online 5.0.
>Only one user in this Online. That is me.
>The long transaction is like this...
>
>begin work;
>update table1 set field1='1';
>update table2 set field2='1';
>update table3 set field3='1';> :
> :
> :
>update table50 set field50='1';>commit work;
>
>I set LTXHWM=50 & LTXEHWM=60. When logical logs
>used 60%, this transaction began rollback. When
>rollback used the last logical log, many
>checkpoint happend. When the last logical log
>used 100%, "The logical logs are full---Backup
>is need." showed on the sys log file. No matter
>I used Auto-Backup or Continue-Backup, I still
>couldn't backup all full logical fogs. The
>Online 5.0 cannot work anymore.
>
>I thought this Online 5.0 got some problems with
>the AIX UNIX 3.2.5. So I test again on SCO UNIX
>whit Online 5.0, the same thing happen. Why????
>It is a bug on Online 5.0? Or I cannot test like
>that? How can I test a long trancation and
>rollback normally?
>
This is exactly what should happen! LTXHWM=50 & LTXEHWM=60 are
figures for a multi-user environment (conservative figures, I
should mention).
The logic is very simple. To rollback a transaction, the minimum
required space in the logical log is the amount used up for the
transaction before the rollback was initiated.
If you have LTXHWM at 50 and LTXEHWM at 60 in a single user
environment, then by the time OL is reacting to initiatiate a
'long trx' abort, your transaction has already used more than
50% of the log. This means that OL cannot rollback your transaction
in the remaining available space.
Further, you cannot free any logs because they are all are involved
with an 'open' transaction.
If you want to test how this works in a single-user environment,
LTXHWM and LTXEHWM should be reduced considerably. Try 5 and 10
to be absolutely sure of a positive result.
Settings of 50 and 60 work fine in a multi-user environment because
the offending transaction would normally occupy only a fraction
of the logs involved since it started (because other transactions
are using the logs simultaneously). Thus, when OL goes into 'exclusive'
at 60, 40% of the log space would usually be enough to rollback the
offender, especially since it blocks most other potential log-fillers.
HTH.
-----------------------
Rudy Fernandes
GIC, Kuwait
OL 7.20UC4, 4GL 6.04UC1
-----------------------