Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@silent-observer
Copy link

Add comment explaining gp_replica_check error

frozen_insert_crash isolation test leaves an AO table tab_fi without cleaning
it up. When writing AO tables, the data is first written to disk and only then
added to WALs. This is acceptable because the visible state of the AO table is
determined by EOF field, which is stored in a regular heap table, and so is
transactional. However, this means that if a crash happens after data is
written to disk, but before writing to WAL, primary's and mirror's segment
files will be different, with primary's file containing the new tuple and
mirror's file missing it.

If gp_replica_check is run after this test, it detects the difference and
signals it as an error. However, this mismatch is actually acceptable, since
EOF change was not committed due to the crash, and so the visible state is
actually identical. If new tuples are added after the crash, they overwrite
the data on primary and the files become identical again.

Unfortunately, making gp_replica_check properly support AO tables is
complicated, because that would require creating new interfaces. EOF is stored
in a different (heap) table, and has different values of each segment file,
and so isn't accessible through existing ones. Fixing gp_replica_check is not
a priority right now, so this patch adds a comment to the test as an
explanation for why this test may cause gp_replica_check errors.

@RekGRpth

This comment was marked as resolved.

@silent-observer
Copy link
Author

Seems like the test was flaky, I created a ticket for it

@silent-observer silent-observer merged commit 1d0e799 into adb-7.2.0 Apr 29, 2025
6 checks passed
@silent-observer silent-observer deleted the ADBDEV-7370 branch April 29, 2025 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants