Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADBDEV-6384: Make the tests from allTest more stable #48

Merged
merged 7 commits into from
Nov 6, 2024

Conversation

KnightMurloc
Copy link

@KnightMurloc KnightMurloc commented Oct 18, 2024

Make the tests from allTest more stable

In the next set of circumstances, the test could fail:

  1. After restoring the Postgres instance, the recovery process starts. Which
    calls the asynchronous archive-get.
  2. After archive-get checks the existence of the queue directory, but before
    writing the WAL file, there are restores in the next test is begun. Which leads
    to the deletion of the queue directory.
  3. Since the directory no longer exists, writing the WAL file will fail, and
    archive-get will write the error file to the queue.
  4. A new Postgres instance will start, and the recovery process will begin,
    which requests the WAL file.
  5. The new archive-get looks into the queue directory, finds the error file, and
    throws out the error, after which the Postgres recovery fails. Because the
    previous archive-get background process has not finished yet.

This patch fixes the problem by using a separate spool directory for each test.

In the next set of circumstances, the test could fail:

1. After restoring the Postgres instance, the recovery process starts. Which
calls the asynchronous archive-get.
2. After archive-get checks the existence of the queue directory, but before
writing the WAL file, there are restores in the next test is begun. Which leads
to the deletion of the queue directory.
3. Since the directory no longer exists, writing the WAL file will fail, and
archive-get will write the error file to the queue.
4. A new Postgres instance will start, and the recovery process will begin,
which requests the WAL file.
5. The new archive-get looks into the queue directory, finds the error file, and
throws out the error, after which the Postgres recovery fails. Because the
previous archive-get background process has not finished yet.

This patch fixes the problem by using a separate spool directory for each test.
@KnightMurloc KnightMurloc marked this pull request as ready for review October 18, 2024 06:58
@Stolb27 Stolb27 merged commit 4be3db5 into 2.52-ci Nov 6, 2024
30 checks passed
@Stolb27 Stolb27 deleted the ADBDEV-6384-ci branch November 6, 2024 06:53
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