|
I was only aware of one Rdb change in recent years that fixed
corruption problems in the RDB$CHANGES table. We have no open problem
reports of such corruptions from other customers, so I assume that that
fix really did take care of the problem. Was it actually in ECO 1? I
don't know. I suggest you post a note in the Rdb notes conference to
get someone to confirm it.
Ah, wait a minute. I had a conversation with someone recently who
expplained that the problem is not really fixed. That is, the problem
is explained and the customer application is supposed to behave a
certain way to avoid the problem. I think the writeup might a little
less than clear on this, at least based on that conversation I had.
I'll try to locate the person I talked to and ask him/her to post a
reply here.
Claude
|
| Hi Adri,
There is a fix to rdb$changes mentioned in the Rdb 6.0A and Rdb 6.1 ECO 2
release notes however, the errors you report in the base note are not
specifically mentioned. But hopefully this will help clarify things.
The "fix" was to actually report an error under certain conditions rather
than have it go undetected and cause the replication database to be wrong.
From the Release notes for Rdb 6.0A:
2.2.12 Corruptions in table RDB$CHANGES after retrying a failed
commit
Table RDB$CHANGES is used by Rdb to keep track of updates
to data that will be replicated to another Rdb database
by DEC Data Distributor. Occasionally that table would
become corrupt, resulting in DDD copy processes failing
with various errors (%DDAL-E-INVLOGTYP, %DDAL-E-INVLOGCLA,
%DDAL-E-PREMATUREEOF, etc).
Corruptions only happened if a COMMIT statement failed
(typically because of a lock conflict or deadlock), and the
application would retry the commit instead of aborting.
If a transaction updates data subjected to replication by
the Data Distributor, and the commit of that transaction
fails with a deadlock, then do not retry the commit.
Instead, rollback the transaction and restart it entirely.
From Rdb note 4131:
"The behaviour of older versions of Rdb was to not write the transaction
to RDB$CHANGES after a COMMIT after a DEADLOCK (at least some of the
time). No error was produced, but the replication database would be
wrong. Returning an error is an improvement."
This same "fix" is in ECO 2 for Rdb 6.1. However, the documentation does
not mention the workaround, that is, to rollback after a deadlock condition
occurs. This has been noted as a documentation error.
Additionally, on page 10-32 of the Guide to SQL Programming mentions
to rollback when you get a deadlock error. Prior to Rdb 6.1-02 and 6.0A,
if you didn't follow this advice, no error would be reported
and the replication table could possibly be inconsistent with the source
table.
Hope this helps,
Diane
|