diff options
author | alexnick <alexnick@ydb.tech> | 2023-08-01 15:08:02 +0300 |
---|---|---|
committer | alexnick <alexnick@ydb.tech> | 2023-08-01 15:08:02 +0300 |
commit | 328b1784036d1962922c22b43bb6fff6e5b64706 (patch) | |
tree | 7096ad2c308af3831bf16dc86cbe575638c6be7b | |
parent | 3dad3b2a193e7f03a5d20bd7c22edd1109f7775a (diff) | |
download | ydb-328b1784036d1962922c22b43bb6fff6e5b64706.tar.gz |
KIKIMR-18906 split serverless http proxy metrics
progress
-rw-r--r-- | ydb/core/http_proxy/auth_factory.cpp | 4 | ||||
-rw-r--r-- | ydb/services/persqueue_v1/actors/read_session_actor.ipp | 6 | ||||
-rw-r--r-- | ydb/services/persqueue_v1/actors/write_session_actor.ipp | 6 |
3 files changed, 13 insertions, 3 deletions
diff --git a/ydb/core/http_proxy/auth_factory.cpp b/ydb/core/http_proxy/auth_factory.cpp index 5d7edb38a92..b09f2127356 100644 --- a/ydb/core/http_proxy/auth_factory.cpp +++ b/ydb/core/http_proxy/auth_factory.cpp @@ -65,7 +65,9 @@ void TIamAuthFactory::Initialize( NKikimr::NHttpProxy::MakeIamTokenServiceID(), TActorSetupCmd(actor, TMailboxType::HTSwap, appData.UserPoolId))); - actor = NKikimr::NHttpProxy::CreateMetricsActor(NKikimr::NHttpProxy::TMetricsSettings{appData.Counters->GetSubgroup("counters", "http_proxy")}); + bool isServerless = appData.FeatureFlags.GetEnableDbCounters(); //TODO: find out it via describe + + actor = NKikimr::NHttpProxy::CreateMetricsActor(NKikimr::NHttpProxy::TMetricsSettings{appData.Counters->GetSubgroup("counters", isServerless ? "http_proxy_serverless" : "http_proxy")}); localServices.push_back(std::pair<TActorId, TActorSetupCmd>( NKikimr::NHttpProxy::MakeMetricsServiceID(), TActorSetupCmd(actor, TMailboxType::HTSwap, appData.UserPoolId))); diff --git a/ydb/services/persqueue_v1/actors/read_session_actor.ipp b/ydb/services/persqueue_v1/actors/read_session_actor.ipp index 3af30877721..4dc966dbb89 100644 --- a/ydb/services/persqueue_v1/actors/read_session_actor.ipp +++ b/ydb/services/persqueue_v1/actors/read_session_actor.ipp @@ -1418,7 +1418,11 @@ void TReadSessionActor<UseMigrationProtocol>::Handle(NGRpcService::TGRpcRequestP WriteToStreamOrDie(ctx, std::move(result)); } } else { - Request->ReplyUnauthenticated("refreshed token is invalid"); + if (ev->Get()->Retryable) { + Request->ReplyUnavaliable(); + } else { + Request->ReplyUnauthenticated("refreshed token is invalid"); + } Die(ctx); } } diff --git a/ydb/services/persqueue_v1/actors/write_session_actor.ipp b/ydb/services/persqueue_v1/actors/write_session_actor.ipp index 8618219d084..f8fe09e9bef 100644 --- a/ydb/services/persqueue_v1/actors/write_session_actor.ipp +++ b/ydb/services/persqueue_v1/actors/write_session_actor.ipp @@ -1556,7 +1556,11 @@ void TWriteSessionActor<UseMigrationProtocol>::Handle(NGRpcService::TGRpcRequest InitCheckSchema(ctx); } } else { - Request->ReplyUnauthenticated("refreshed token is invalid"); + if (ev->Get()->Retryable) { + Request->ReplyUnavaliable(); + } else { + Request->ReplyUnauthenticated("refreshed token is invalid"); + } Die(ctx); } } |