Movatterモバイル変換


[0]ホーム

URL:


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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
funny-falcon merged 5 commits intomasterfromREL_2_5-some-fixes
Oct 13, 2022
Merged

Small fixes#546

funny-falcon merged 5 commits intomasterfromREL_2_5-some-fixes
Oct 13, 2022

Conversation

funny-falcon
Copy link
Collaborator

No description provided.

@funny-falconfunny-falcon changed the base branch frommaster toREL_2_5October 11, 2022 06:38
@@ -361,6 +361,7 @@ main(int argc, char *argv[])
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
CollaboratorAuthor

Choose a reason for hiding this comment

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

done

@@ -3381,9 +3384,9 @@ fio_communicate(int in, int out)
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
CollaboratorAuthor

Choose a reason for hiding this comment

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

! Спасибо!

src/archive.c Outdated
@@ -761,8 +761,8 @@ push_file_internal_gz(const char *wal_file_name, const char *pg_xlog_dir,
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
CollaboratorAuthor

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.

@kulaginm
Copy link
Member

kulaginm commentedOct 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.
Но это моё имхо, что думаешь?

@funny-falcon
Copy link
CollaboratorAuthor

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

@funny-falcon
Copy link
CollaboratorAuthor

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

@funny-falconfunny-falcon changed the base branch fromREL_2_5 tomasterOctober 13, 2022 11:24
@funny-falconfunny-falcon merged commit3c1fadc intomasterOct 13, 2022
@BurusBurus added this to the2.5.9 milestoneDec 21, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@kulaginmkulaginmkulaginm approved these changes

@gsmolkgsmolkAwaiting 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.

3 participants
@funny-falcon@kulaginm@Burus

[8]ページ先頭

©2009-2025 Movatter.jp