It is possible for the Database to accept duplicate Writes upon restarting after a crash. Consider a scenario where there Buffer contains:
ADD Y
ADD X
REMOVE X
ADD X
REMOVE X
and both cpb and csb are written, but ctb is not, preventing the Buffer page from being deleted.
When the server restarts, an attempt will be made to reply ADD Y, but it will fail because the database (per the written cpb) will contain Y.
However, when an attempt is made to replay ADD X, it will succeed because the database (per the written cpb) will contain X. This is possible because the value of the Writes are checked instead of checking the version numbers. Since the replay succeeds, the remaining writes in the buffer will ALL be replayed and duplicated.
This does not lead to any data consistency issues per se, but the write versions will be duplicated.
It is possible for the Database to accept duplicate Writes upon restarting after a crash. Consider a scenario where there Buffer contains:
and both cpb and csb are written, but ctb is not, preventing the Buffer page from being deleted.
When the server restarts, an attempt will be made to reply ADD Y, but it will fail because the database (per the written cpb) will contain Y.
However, when an attempt is made to replay ADD X, it will succeed because the database (per the written cpb) will contain X. This is possible because the value of the Writes are checked instead of checking the version numbers. Since the replay succeeds, the remaining writes in the buffer will ALL be replayed and duplicated.
This does not lead to any data consistency issues per se, but the write versions will be duplicated.