diff --git a/ydb/core/transfer/ut/functional/transfer_ut.cpp b/ydb/core/transfer/ut/functional/transfer_ut.cpp index 48075fcd1260..7322b2cca206 100644 --- a/ydb/core/transfer/ut/functional/transfer_ut.cpp +++ b/ydb/core/transfer/ut/functional/transfer_ut.cpp @@ -1519,7 +1519,6 @@ Y_UNIT_TEST_SUITE(Transfer) )"); testCase.CreateTopic(1); - testCase.CreateDirectory("/local/subdir"); testCase.CreateTransfer(TStringBuilder() << "subdir/" << testCase.TransferName, Sprintf(R"( $l = ($x) -> { return [ diff --git a/ydb/core/tx/schemeshard/schemeshard__op_traits.h b/ydb/core/tx/schemeshard/schemeshard__op_traits.h index 755fc6a7509d..38ba082643ee 100644 --- a/ydb/core/tx/schemeshard/schemeshard__op_traits.h +++ b/ydb/core/tx/schemeshard/schemeshard__op_traits.h @@ -187,6 +187,13 @@ struct TSchemeTxTraits +struct TSchemeTxTraits + : public TSchemeTxTraitsFallback +{ + constexpr inline static bool CreateDirsFromName = true; +}; + template <> struct TSchemeTxTraits : public TSchemeTxTraitsFallback diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_create_replication.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_create_replication.cpp index d495eb058f96..2651804eaca1 100644 --- a/ydb/core/tx/schemeshard/schemeshard__operation_create_replication.cpp +++ b/ydb/core/tx/schemeshard/schemeshard__operation_create_replication.cpp @@ -543,17 +543,29 @@ class TCreateReplication: public TSubOperation { } // anonymous -using TTag = TSchemeTxTraits; +using TReplicationTag = TSchemeTxTraits; +using TTransferTag = TSchemeTxTraits; namespace NOperation { template <> -std::optional GetTargetName(TTag, const TTxTransaction& tx) { +std::optional GetTargetName(TReplicationTag, const TTxTransaction& tx) { return tx.GetReplication().GetName(); } template <> -bool SetName(TTag, TTxTransaction& tx, const TString& name) { +bool SetName(TReplicationTag, TTxTransaction& tx, const TString& name) { + tx.MutableReplication()->SetName(name); + return true; +} + +template <> +std::optional GetTargetName(TTransferTag, const TTxTransaction& tx) { + return tx.GetReplication().GetName(); +} + +template <> +bool SetName(TTransferTag, TTxTransaction& tx, const TString& name) { tx.MutableReplication()->SetName(name); return true; }