File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed
ydb/core/kqp/workload_service/actors Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -483,12 +483,12 @@ class TDatabaseFetcherActor : public TSchemeActorBase<TDatabaseFetcherActor> {
483483 }
484484 return ;
485485 case EStatus::Ok:
486+ if (!IsSubDomainPath (result)) {
487+ Reply (Ydb::StatusIds::UNSUPPORTED, TStringBuilder () << " Invalid database path " << Database << " , please check the correctness of the path" );
488+ return ;
489+ }
486490 if (result.DomainInfo ) {
487491 Serverless = result.DomainInfo ->IsServerless ();
488- if (result.Self ->Info .GetPathId () != result.DomainInfo ->DomainKey .LocalPathId ) {
489- Reply (Ydb::StatusIds::UNSUPPORTED, TStringBuilder () << " Invalid database " << Database << " , domain path id is different" );
490- return ;
491- }
492492 }
493493 Reply (Ydb::StatusIds::SUCCESS);
494494 return ;
@@ -541,6 +541,18 @@ class TDatabaseFetcherActor : public TSchemeActorBase<TDatabaseFetcherActor> {
541541 PassAway ();
542542 }
543543
544+ static bool IsSubDomainPath (const NSchemeCache::TSchemeCacheNavigate::TEntry& entry) {
545+ switch (entry.Kind ) {
546+ case NSchemeCache::TSchemeCacheNavigate::EKind::KindSubdomain:
547+ case NSchemeCache::TSchemeCacheNavigate::EKind::KindExtSubdomain:
548+ return true ;
549+ case NSchemeCache::TSchemeCacheNavigate::EKind::KindPath:
550+ return entry.Self ->Info .GetPathId () == NSchemeShard::RootPathId;
551+ default :
552+ return false ;
553+ }
554+ }
555+
544556private:
545557 const TActorId ReplyActorId;
546558 const TString Database;
You can’t perform that action at this time.
0 commit comments