Browse Source

Intermediate changes

robot-piglet 1 year ago
parent
commit
05e895a3e1

+ 1 - 1
yt/yt/client/federated/client.cpp

@@ -699,7 +699,7 @@ ITransactionPtr TClient::AttachTransaction(
 
 void TClient::HandleError(const TErrorOr<void>& error, int clientIndex)
 {
-    if (!NRpc::IsChannelFailureError(error)) {
+    if (!NRpc::IsChannelFailureError(error) && !Config_->RetryAnyError) {
         return;
     }
 

+ 3 - 0
yt/yt/client/federated/config.cpp

@@ -18,6 +18,9 @@ void TFederationConfig::Register(TRegistrar registrar)
     registrar.Parameter("cluster_retry_attempts", &TThis::ClusterRetryAttempts)
         .GreaterThanOrEqual(0)
         .Default(3);
+
+    registrar.Parameter("retry_any_error", &TThis::RetryAnyError)
+        .Default(false);
 }
 
 void TConnectionConfig::Register(TRegistrar registrar)

+ 3 - 0
yt/yt/client/federated/config.h

@@ -25,6 +25,9 @@ public:
     //! Maximum number of retry attempts to make.
     int ClusterRetryAttempts;
 
+    //! For testing purposes only. Retry any error through a different cluster.
+    bool RetryAnyError;
+
     REGISTER_YSON_STRUCT(TFederationConfig);
 
     static void Register(TRegistrar registrar);

+ 3 - 0
yt/yt/client/object_client/public.h

@@ -331,6 +331,9 @@ DEFINE_ENUM(EObjectType,
     // Zookeeper stuff
     ((ZookeeperShard)                              (1400))
     ((ZookeeperShardMap)                           (1401))
+
+    // Flow stuff
+    ((Pipeline)                                    (1600))
 );
 
 //! A bit mask marking schema types.

+ 1 - 1
yt/yt/flow/lib/client/public.h

@@ -35,7 +35,7 @@ YT_DEFINE_STRONG_TYPEDEF(TVersion, i64);
 
 ////////////////////////////////////////////////////////////////////////////////
 
-inline const TString PipelineFormatVersionAttribute("flow_pipeline_format_version");
+inline const TString PipelineFormatVersionAttribute("pipeline_format_version");
 inline const TString LeaderControllerAddressAttribute("leader_controller_address");
 
 constexpr int CurrentPipelineFormatVersion = 1;