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

return grandchildren flag #13307

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

adameat
Copy link
Member

@adameat adameat commented Jan 13, 2025

Changelog entry

...

Changelog category

  • New feature

Additional information

for every child in describe return flag if this child has children.
it's required to correctly draw a schema tree.

closes #13305

@adameat adameat self-assigned this Jan 13, 2025
@adameat adameat requested a review from CyberROFL January 13, 2025 06:35
@@ -1862,6 +1862,7 @@ message TDirEntry {
optional uint64 PathVersion = 13;
optional EPathSubType PathSubType = 14;
optional TPathVersion Version = 15;
optional bool ChildrenExist = 16;
Copy link
Member

Choose a reason for hiding this comment

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

Это не будет работать, потому что при добавлении потомка мы публикуем родителя, но не прародителя. Так например добавляем в директории A директорию B, на директории B у A будет ChildrenExist==false, но при добавлении потомка в директории B директория A останется в кешах и не обновится, в итоге флаг будет неправильный.

@adameat adameat force-pushed the add-grandchildren-to-describe branch 3 times, most recently from 1f18b9d to 0e0efc8 Compare January 13, 2025 12:34
@adameat adameat marked this pull request as draft January 13, 2025 12:35
@adameat adameat force-pushed the add-grandchildren-to-describe branch 7 times, most recently from 22aef25 to cad3451 Compare January 15, 2025 05:05
@adameat adameat marked this pull request as ready for review January 15, 2025 07:31
@adameat adameat requested a review from snaury January 15, 2025 07:31
parentPath.Base()->IncAliveChildrenPrivate(isBackup);
if (parentPath.Base()->GetAliveChildren() == 1 && !parentPath.Base()->IsDomainRoot()) {
auto grandParent = parentPath.Parent();
if (grandParent.Base()->IsDirectory() || grandParent.Base()->IsDomainRoot()) {
Copy link
Member

Choose a reason for hiding this comment

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

Тут вроде бы должно быть grandParent.Base()->IsLikeDirectory().

if (parentPath.Base()->GetAliveChildren() == 1 && !parentPath.Base()->IsDomainRoot()) {
auto grandParent = parentPath.Parent();
if (grandParent.Base()->IsDirectory() || grandParent.Base()->IsDomainRoot()) {
++grandParent.Base()->DirAlterVersion;
Copy link
Member

Choose a reason for hiding this comment

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

Как я понял в случае изменения parentPath мы закладываемся на то, что вызывающий код уже вызвал на нём context.MemChanges.GrabPath (хорошо бы кстати это как-то валидировать). А каким образом обеспечивается SafeWithUndo, если на этот grandParent вызывающий код скорее всего ничего такого не сделал?

@adameat adameat force-pushed the add-grandchildren-to-describe branch from cad3451 to f9b66f1 Compare January 15, 2025 11:40
@adameat adameat enabled auto-merge (squash) January 15, 2025 11:42
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 15, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 15, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 15, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 15, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 15, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 15, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 15, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 15, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 15, 2025
@adameat adameat force-pushed the add-grandchildren-to-describe branch from f9b66f1 to 403628b Compare January 15, 2025 11:46
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 15, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 15, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 15, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 15, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 15, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 15, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 15, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 15, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 15, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 15, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 15, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 15, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 15, 2025
@adameat adameat requested a review from ijon January 15, 2025 11:53
@adameat adameat force-pushed the add-grandchildren-to-describe branch from 403628b to c8ab033 Compare January 16, 2025 06:18
Copy link

github-actions bot commented Jan 16, 2025

2025-01-16 06:20:30 UTC Pre-commit check linux-x86_64-release-asan for 824d681 has started.
2025-01-16 06:20:56 UTC Artifacts will be uploaded here
2025-01-16 06:24:50 UTC ya make is running...
🟡 2025-01-16 07:58:02 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
13511 13452 0 24 8 27

2025-01-16 08:00:11 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-01-16 08:18:35 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
99 (only retried tests) 70 0 2 1 26

2025-01-16 08:18:44 UTC ya make is running... (failed tests rerun, try 3)
🟢 2025-01-16 08:31:20 UTC Tests successful.

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
53 (only retried tests) 27 0 0 0 26

🟢 2025-01-16 08:31:26 UTC Build successful.
🟢 2025-01-16 08:31:55 UTC ydbd size 3.6 GiB changed* by +31.5 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 3fde25c merge: 824d681 diff diff %
ydbd size 3 902 729 112 Bytes 3 902 761 368 Bytes +31.5 KiB +0.001%
ydbd stripped size 1 362 485 616 Bytes 1 362 492 016 Bytes +6.2 KiB +0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Jan 16, 2025

2025-01-16 06:20:57 UTC Pre-commit check linux-x86_64-relwithdebinfo for 824d681 has started.
2025-01-16 06:21:16 UTC Artifacts will be uploaded here
2025-01-16 06:25:05 UTC ya make is running...
🟡 2025-01-16 07:51:44 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
27537 25019 0 11 2380 127

2025-01-16 07:54:00 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-01-16 08:08:41 UTC Tests successful.

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
197 (only retried tests) 78 0 0 0 119

🟢 2025-01-16 08:08:48 UTC Build successful.
🟢 2025-01-16 08:09:09 UTC ydbd size 2.1 GiB changed* by +29.5 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 3fde25c merge: 824d681 diff diff %
ydbd size 2 252 411 408 Bytes 2 252 441 648 Bytes +29.5 KiB +0.001%
ydbd stripped size 473 385 808 Bytes 473 393 488 Bytes +7.5 KiB +0.002%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 16, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 16, 2025
@adameat adameat merged commit 0fd4bda into ydb-platform:main Jan 16, 2025
12 checks passed
@adameat adameat deleted the add-grandchildren-to-describe branch January 16, 2025 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

return grandchildren flag
3 participants