-
Notifications
You must be signed in to change notification settings - Fork 597
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
return grandchildren flag #13307
Conversation
@@ -1862,6 +1862,7 @@ message TDirEntry { | |||
optional uint64 PathVersion = 13; | |||
optional EPathSubType PathSubType = 14; | |||
optional TPathVersion Version = 15; | |||
optional bool ChildrenExist = 16; |
There was a problem hiding this comment.
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 останется в кешах и не обновится, в итоге флаг будет неправильный.
1f18b9d
to
0e0efc8
Compare
22aef25
to
cad3451
Compare
ydb/core/tx/schemeshard/schemeshard__operation_create_backup_collection.cpp
Show resolved
Hide resolved
parentPath.Base()->IncAliveChildrenPrivate(isBackup); | ||
if (parentPath.Base()->GetAliveChildren() == 1 && !parentPath.Base()->IsDomainRoot()) { | ||
auto grandParent = parentPath.Parent(); | ||
if (grandParent.Base()->IsDirectory() || grandParent.Base()->IsDomainRoot()) { |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
вызывающий код скорее всего ничего такого не сделал?
cad3451
to
f9b66f1
Compare
f9b66f1
to
403628b
Compare
403628b
to
c8ab033
Compare
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
Changelog entry
...
Changelog category
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