Skip to content

Commit a84e542

Browse files
authored
mvp - disable offload merge (#7228)
1 parent 1f1e2ac commit a84e542

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

ydb/mvp/meta/meta_cp_databases.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ class THandlerActorMetaCpDatabasesGET : THandlerActorYdbc, public NActors::TActo
4343
TDuration DatabaseRequestRetryDelta = TDuration::MilliSeconds(50);
4444
TString ControlPlaneName;
4545
TString MvpTokenName;
46-
bool Light = false;
4746

4847
THandlerActorMetaCpDatabasesGET(
4948
const NActors::TActorId& httpProxyId,
@@ -146,11 +145,20 @@ class THandlerActorMetaCpDatabasesGET : THandlerActorYdbc, public NActors::TActo
146145
}
147146
if (balancer) {
148147
TString balancerEndpoint;
149-
if (Request.Parameters["light"] == "1") {
150-
balancerEndpoint = GetApiUrl(balancer, "/tenantinfo?tablets=0&offload_merge=1&storage=1&nodes=0&users=0&timeout=55000");
148+
TStringBuilder balancerEndpointBuilder;
149+
balancerEndpointBuilder << "/tenantinfo";
150+
if (Request.Parameters["light"] == "0") {
151+
balancerEndpointBuilder << "?tablets=1";
151152
} else {
152-
balancerEndpoint = GetApiUrl(balancer, "/tenantinfo?tablets=1&offload_merge=1&storage=1&nodes=1&users=1&timeout=55000");
153+
balancerEndpointBuilder << "?tablets=0"; // default
153154
}
155+
if (Request.Parameters["offload"] == "1") {
156+
balancerEndpointBuilder << "&offload_merge=1";
157+
} else {
158+
balancerEndpointBuilder << "&offload_merge=0"; // default
159+
}
160+
balancerEndpointBuilder << "&storage=1&nodes=0&users=0&timeout=55000";
161+
balancerEndpoint = GetApiUrl(balancer, balancerEndpointBuilder);
154162
NHttp::THttpOutgoingRequestPtr httpRequest = NHttp::THttpOutgoingRequest::CreateRequestGet(balancerEndpoint);
155163
TString authHeaderValue = GetAuthHeaderValue(apiUserTokenName);
156164
if (balancerEndpoint.StartsWith("https") && !authHeaderValue.empty()) {

0 commit comments

Comments
 (0)