aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Efimov <xeno@ydb.tech>2024-07-18 19:28:45 +0700
committerGitHub <noreply@github.com>2024-07-18 15:28:45 +0300
commit2d8ae71907f4da2c07c941ea8efa277d4680d216 (patch)
tree0766bb0dfaeca5c0fff1920a3bfe031da7d3ca04
parenta1bc95abba649bfe2b5c4cdf7c7687fa3fd6d8c0 (diff)
downloadydb-2d8ae71907f4da2c07c941ea8efa277d4680d216.tar.gz
disable outgoing cache for mvp meta (#6806)
-rw-r--r--ydb/mvp/meta/meta.cpp26
1 files changed, 5 insertions, 21 deletions
diff --git a/ydb/mvp/meta/meta.cpp b/ydb/mvp/meta/meta.cpp
index ee901a87dd..4e276b5b22 100644
--- a/ydb/mvp/meta/meta.cpp
+++ b/ydb/mvp/meta/meta.cpp
@@ -39,21 +39,6 @@ NHttp::TCachePolicy GetIncomingMetaCachePolicy(const NHttp::THttpRequest* reques
return NHttp::GetDefaultCachePolicy(request, policy);
}
-NHttp::TCachePolicy GetOutgoingMetaCachePolicy(const NHttp::THttpRequest* request) {
- NHttp::TCachePolicy policy;
- if (request->Method != "GET") {
- return policy;
- }
- TStringBuf url(request->URL);
- if (url.EndsWith("/viewer/json/cluster") || url.EndsWith("/viewer/json/sysinfo") || url.find("/viewer/json/tenantinfo") != TStringBuf::npos) {
- policy.TimeToExpire = TDuration::Minutes(5);
- policy.TimeToRefresh = TDuration::Seconds(60);
- policy.KeepOnError = true;
- }
-
- return NHttp::GetDefaultCachePolicy(request, policy);
-}
-
TYdbLocation MetaLocation =
{
"meta",
@@ -160,7 +145,6 @@ void TMVP::InitMeta() {
LocalEndpoint = TStringBuilder() << "http://" << FQDNHostName() << ":" << HttpPort;
TActorId httpIncomingProxyId = ActorSystem.Register(NHttp::CreateIncomingHttpCache(HttpProxyId, GetIncomingMetaCachePolicy));
- TActorId httpOutgoingProxyId = ActorSystem.Register(NHttp::CreateOutgoingHttpCache(HttpProxyId, GetOutgoingMetaCachePolicy));
if (MetaCache) {
httpIncomingProxyId = ActorSystem.Register(NMeta::CreateHttpMetaCache(httpIncomingProxyId, GetIncomingMetaCachePolicy, GetCacheOwnership));
@@ -174,31 +158,31 @@ void TMVP::InitMeta() {
ActorSystem.Send(httpIncomingProxyId, new NHttp::TEvHttpProxy::TEvRegisterHandler(
"/meta/clusters",
- ActorSystem.Register(new NMVP::THandlerActorMetaClusters(httpOutgoingProxyId, MetaLocation))
+ ActorSystem.Register(new NMVP::THandlerActorMetaClusters(HttpProxyId, MetaLocation))
)
);
ActorSystem.Send(httpIncomingProxyId, new NHttp::TEvHttpProxy::TEvRegisterHandler(
"/meta/cluster",
- ActorSystem.Register(new NMVP::THandlerActorMetaCluster(httpOutgoingProxyId, MetaLocation))
+ ActorSystem.Register(new NMVP::THandlerActorMetaCluster(HttpProxyId, MetaLocation))
)
);
ActorSystem.Send(httpIncomingProxyId, new NHttp::TEvHttpProxy::TEvRegisterHandler(
"/meta/cp_databases",
- ActorSystem.Register(new NMVP::THandlerActorMetaCpDatabases(httpOutgoingProxyId, MetaLocation))
+ ActorSystem.Register(new NMVP::THandlerActorMetaCpDatabases(HttpProxyId, MetaLocation))
)
);
ActorSystem.Send(httpIncomingProxyId, new NHttp::TEvHttpProxy::TEvRegisterHandler(
"/meta/cp_databases_verbose",
- ActorSystem.Register(new NMVP::THandlerActorMetaCpDatabasesVerbose(httpOutgoingProxyId, MetaLocation))
+ ActorSystem.Register(new NMVP::THandlerActorMetaCpDatabasesVerbose(HttpProxyId, MetaLocation))
)
);
ActorSystem.Send(httpIncomingProxyId, new NHttp::TEvHttpProxy::TEvRegisterHandler(
"/meta/cloud",
- ActorSystem.Register(new NMVP::THandlerActorMetaCloud(httpOutgoingProxyId, MetaLocation))
+ ActorSystem.Register(new NMVP::THandlerActorMetaCloud(HttpProxyId, MetaLocation))
)
);