File tree 1 file changed +16
-4
lines changed
ydb/core/kqp/workload_service/actors
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> {
483
483
}
484
484
return ;
485
485
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
+ }
486
490
if (result.DomainInfo ) {
487
491
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
- }
492
492
}
493
493
Reply (Ydb::StatusIds::SUCCESS);
494
494
return ;
@@ -541,6 +541,18 @@ class TDatabaseFetcherActor : public TSchemeActorBase<TDatabaseFetcherActor> {
541
541
PassAway ();
542
542
}
543
543
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
+
544
556
private:
545
557
const TActorId ReplyActorId;
546
558
const TString Database;
You can’t perform that action at this time.
0 commit comments