Browse Source

Intermediate changes

robot-piglet 1 year ago
parent
commit
e12e200e98
2 changed files with 6 additions and 0 deletions
  1. 4 0
      yt/yt/client/cache/rpc.cpp
  2. 2 0
      yt/yt_proto/yt/client/cache/proto/config.proto

+ 4 - 0
yt/yt/client/cache/rpc.cpp

@@ -68,6 +68,10 @@ NApi::NRpcProxy::TConnectionConfigPtr GetConnectionConfig(const TConfig& config)
     connectionConfig->ResponseCodec = GetCompressionCodecFromProto(config.GetResponseCodec());
     connectionConfig->EnableRetries = config.GetEnableRetries();
 
+    if (config.HasEnableLegacyRpcCodecs()) {
+        connectionConfig->EnableLegacyRpcCodecs = config.GetEnableLegacyRpcCodecs();
+    }
+
     if (config.HasRetryBackoffTime()) {
         connectionConfig->RetryingChannel->RetryBackoffTime = TDuration::MilliSeconds(config.GetRetryBackoffTime());
     }

+ 2 - 0
yt/yt_proto/yt/client/cache/proto/config.proto

@@ -29,6 +29,8 @@ message TConfig
 
     optional ECompressionCodec RequestCodec = 17 [default = None];
     optional ECompressionCodec ResponseCodec = 12 [default = None];
+    // Should set EnableLegacyRpcCodecs=False, to enable RequestCodec & ResponseCodec: https://nda.ya.ru/t/iXCfYZjS6yNEwg
+    optional bool EnableLegacyRpcCodecs = 20;
 
     optional bool EnableRetries = 13;
     optional uint32 RetryBackoffTime = 14;