Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Small fixes #546

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
funny-falcon merged 5 commits into master from REL_2_5-some-fixes
Oct 13, 2022
Merged

Small fixes #546

funny-falcon merged 5 commits into master from REL_2_5-some-fixes
Oct 13, 2022

Conversation

Copy link
Collaborator

@funny-falcon funny-falcon commented Oct 11, 2022

No description provided.

@funny-falcon funny-falcon changed the base branch from master to REL_2_5 October 11, 2022 06:38
elog(ERROR, "Version mismatch, pg_probackup binary with version '%s' "
"is launched as an agent for pg_probackup binary with version '%s'",
PROGRAM_VERSION, argv[2]);
remote_agent = true;
Copy link
Member

Choose a reason for hiding this comment

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

Я думаю тогда надо дочистить и упоминание условия в config_get_opt() (потому что в случае агента эта функция вроде и не вызывается).

Copy link
Collaborator Author

@funny-falcon funny-falcon Oct 11, 2022

Choose a reason for hiding this comment

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

done

src/utils/file.c Outdated
break;
case FIO_GET_CRC32:
/* calculate crc32 for a file */
if (hdr.arg == 1)
Copy link
Member

Choose a reason for hiding this comment

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

А это условие разве остаётся корректным после введения битовых флагов в arg?

Copy link
Collaborator Author

@funny-falcon funny-falcon Oct 11, 2022

Choose a reason for hiding this comment

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

! Спасибо!

src/archive.c Outdated
pg_crc32 crc32_src;
pg_crc32 crc32_dst;

/* TODO: what if one of them goes missing? */
Copy link
Member

Choose a reason for hiding this comment

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

А что с этим комментарием? Он актуален?

Copy link
Collaborator Author

@funny-falcon funny-falcon Oct 11, 2022

Choose a reason for hiding this comment

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

Хороший вопрос: могут ли у нас под ногами удалить файл?
Думаю, пока можно "забить" и убрать комментарий.
В целом, даже если мы хотим передавать missing_ok=true , нужно различать "не существовавший" файл и файл с crc==0. Так что, придётся переделывать API.

Copy link
Member

kulaginm commented Oct 11, 2022
edited
Loading

По поводу введения set_forkname:
Первое, за что зацепился глаз -- это то, что функция глобальная, а мне кажется, что не надо выносить это за пределы src/dir.c.
Предлагаю рассматривать pgFileInit() как некоторый "конструктор" "объектов" pgFile и внести логику/вызов заполнения forkName внутрь этого "конструктора".
Тут остаётся вопрос с обработкой external_dir_num, вижу два варианта:
или заполнять поле forkName в любом случае (так как оно зависит от имени), а обработку external_dir_num оставить на внешнюю логику (которая пользуется pgFile)
или вообще сделать два "конструктора" pgFile, один для создания pgFile из файловой системы (из dir_check_file()), второй из бекапа (get_backup_filelist()).
В любом случае в функции get_backup_filelist() смесь логики чтения файла и заполнения внутренних полей pgFile мне кажется очень некрасивой, хотелось бы побольше убрать внутрь src/dir.c.
Но это моё имхо, что думаешь?

Copy link
Collaborator Author

Рефакторинг инициализации pgFile выделен в отдельную задачу.

Copy link
Collaborator Author

test_basic_ptrack_truncate_replica - локально 20 минут гонял (~25 раз), ни разу не упал

@funny-falcon funny-falcon changed the base branch from REL_2_5 to master October 13, 2022 11:24
@funny-falcon funny-falcon merged commit 3c1fadc into master Oct 13, 2022
@Burus Burus added this to the 2.5.9 milestone Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@kulaginm kulaginm kulaginm approved these changes

@gsmolk gsmolk Awaiting requested review from gsmolk

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
2.5.9
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /