Skip to content

[PBCKP-150] Reading buffer is flushed each time we verify the checksum. #487

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

Merged
merged 5 commits into from
May 25, 2022

Conversation

daniel-95
Copy link
Contributor

The race condition is covered with a unit-test, the buffer is flushed
now so each of 300 reads requests the data from the disc.

The race condition is covered with a unit-test, the buffer is flushed
now so each of 300 reads requests the data from the disc.
@daniel-95 daniel-95 requested a review from kulaginm May 4, 2022 14:57
src/data.c Outdated
@@ -301,6 +301,8 @@ prepare_page(pgFile *file, XLogRecPtr prev_backup_start_lsn,
{
/* read the block */
int read_len = fio_pread(in, page, blknum * BLCKSZ);
/* avoid re-reading once buffered data, see PBCKP-150 */
fflush(in);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why here? It should be at the end of loop body, before next iteration.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And I didn't get: in could be remote or not?

@daniel-95 daniel-95 force-pushed the PBCKP-150_race_condition branch from ad21b30 to de8634d Compare May 11, 2022 08:59
@kulaginm kulaginm added this to the 2.5.6 milestone May 17, 2022
@kulaginm kulaginm changed the base branch from master to release_2_5_6 May 17, 2022 09:24
@kulaginm kulaginm removed their request for review May 25, 2022 11:02
kulaginm added 2 commits May 25, 2022 14:34
…use in lengthy tests

add description for new PG_PROBACKUP_LONG variable
adding one test run of this test to travis
@kulaginm kulaginm merged commit 68b77a0 into release_2_5_6 May 25, 2022
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.

3 participants