Skip to content

Commit 7018b49

Browse files
committed
schemeshard: remove schemeshard_utils.h from common operation dependencies
1 parent e8b071c commit 7018b49

24 files changed

+49
-17
lines changed

ydb/core/tx/schemeshard/schemeshard__operation_alter_cdc_stream.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#include "schemeshard__operation_iface.h"
55
#include "schemeshard__operation_common.h"
66

7+
#include "schemeshard_utils.h" // for TransactionTemplate
8+
79
#define LOG_D(stream) LOG_DEBUG_S (context.Ctx, NKikimrServices::FLAT_TX_SCHEMESHARD, "[" << context.SS->SelfTabletId() << "] " << stream)
810
#define LOG_I(stream) LOG_INFO_S (context.Ctx, NKikimrServices::FLAT_TX_SCHEMESHARD, "[" << context.SS->SelfTabletId() << "] " << stream)
911
#define LOG_N(stream) LOG_NOTICE_S(context.Ctx, NKikimrServices::FLAT_TX_SCHEMESHARD, "[" << context.SS->SelfTabletId() << "] " << stream)

ydb/core/tx/schemeshard/schemeshard__operation_alter_continuous_backup.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#include "schemeshard__operation_common.h"
44
#include "schemeshard__operation_alter_cdc_stream.h"
55

6+
#include "schemeshard_utils.h" // for TransactionTemplate
7+
68
#include <ydb/core/tx/schemeshard/backup/constants.h>
79

810
#include <ydb/core/engine/mkql_proto.h>

ydb/core/tx/schemeshard/schemeshard__operation_alter_extsubdomain.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include "schemeshard__operation_iface.h"
33
#include "schemeshard__operation_common.h"
44
#include "schemeshard__operation_common_subdomain.h"
5+
#include "schemeshard_utils.h" // for TransactionTemplate
56

67
#include <ydb/core/base/subdomain.h>
78
#include <ydb/core/base/hive.h>

ydb/core/tx/schemeshard/schemeshard__operation_alter_pq.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#include "schemeshard__operation_common.h"
44
#include "schemeshard_limits.h"
55

6+
#include "schemeshard_utils.h" // for PQGroupReserve
7+
68
#include <ydb/core/base/subdomain.h>
79
#include <ydb/core/mind/hive/hive.h>
810
#include <ydb/core/persqueue/config/config.h>

ydb/core/tx/schemeshard/schemeshard__operation_alter_table.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#include "schemeshard__operation_iface.h"
33
#include "schemeshard__operation_common.h"
44

5+
#include "schemeshard_utils.h" // for TransactionTemplate
6+
57
#include <ydb/core/base/subdomain.h>
68
#include <ydb/core/base/hive.h>
79

ydb/core/tx/schemeshard/schemeshard__operation_apply_build_index.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#include "schemeshard__operation_iface.h"
33
#include "schemeshard__operation_common.h"
44

5+
#include "schemeshard_utils.h" // for TransactionTemplate
6+
57
#include <ydb/core/base/table_index.h>
68
#include <ydb/core/protos/flat_tx_scheme.pb.h>
79
#include <ydb/core/protos/flat_scheme_op.pb.h>

ydb/core/tx/schemeshard/schemeshard__operation_consistent_copy_tables.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#include "schemeshard__operation_part.h"
22
#include "schemeshard__operation_iface.h"
33
#include "schemeshard__operation_common.h"
4-
#include "schemeshard_path_element.h"
4+
5+
#include "schemeshard_utils.h" // for TransactionTemplate
56

67
#include <ydb/core/base/path.h>
78
#include <ydb/core/protos/flat_tx_scheme.pb.h>

ydb/core/tx/schemeshard/schemeshard__operation_copy_table.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#include "schemeshard_tx_infly.h"
55
#include "schemeshard_cdc_stream_common.h"
66

7+
#include "schemeshard_utils.h" // for TransactionTemplate
8+
79
#include <ydb/core/mind/hive/hive.h>
810
#include <ydb/core/base/subdomain.h>
911

ydb/core/tx/schemeshard/schemeshard__operation_create_build_index.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#include "schemeshard__operation_part.h"
22
#include "schemeshard__operation_iface.h"
33
#include "schemeshard__operation_common.h"
4-
#include "schemeshard_path_element.h"
5-
#include "schemeshard_utils.h"
4+
5+
#include "schemeshard_utils.h" // for TransactionTemplate
66

77
#include <ydb/core/base/table_vector_index.h>
88
#include <ydb/core/protos/flat_tx_scheme.pb.h>

ydb/core/tx/schemeshard/schemeshard__operation_create_cdc_stream.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#include "schemeshard__operation_iface.h"
33
#include "schemeshard__operation_common.h"
44

5+
#include "schemeshard_utils.h" // for TransactionTemplate
6+
57
#include "schemeshard_cdc_stream_common.h"
68
#include "schemeshard__operation_create_cdc_stream.h"
79

ydb/core/tx/schemeshard/schemeshard__operation_create_indexed_table.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#include "schemeshard__operation_part.h"
22
#include "schemeshard__operation_iface.h"
33
#include "schemeshard__operation_common.h"
4-
#include "schemeshard_path_element.h"
5-
#include "schemeshard_utils.h"
4+
5+
#include "schemeshard_utils.h" // for TransactionTemplate
66

77
#include <ydb/core/protos/flat_tx_scheme.pb.h>
88
#include <ydb/core/protos/flat_scheme_op.pb.h>

ydb/core/tx/schemeshard/schemeshard__operation_create_pq.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#include "schemeshard__operation_common.h"
44
#include "schemeshard_limits.h"
55

6+
#include "schemeshard_utils.h" // for PQGroupReserve
7+
68
#include <library/cpp/int128/int128.h>
79

810
#include <ydb/core/base/subdomain.h>

ydb/core/tx/schemeshard/schemeshard__operation_create_restore_incremental_backup.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#include "schemeshard__operation_iface.h"
33
#include "schemeshard__operation_common.h"
44

5+
#include "schemeshard_utils.h" // for TransactionTemplate
6+
57
#include "schemeshard__operation_create_cdc_stream.h"
68

79
#define LOG_D(stream) LOG_DEBUG_S (context.Ctx, NKikimrServices::FLAT_TX_SCHEMESHARD, "[" << context.SS->SelfTabletId() << "] " << stream)

ydb/core/tx/schemeshard/schemeshard__operation_create_table.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#include "schemeshard__operation_iface.h"
33
#include "schemeshard__operation_common.h"
44

5+
#include "schemeshard_utils.h" // for IsAllowedKeyType
6+
57
#include <ydb/core/protos/flat_scheme_op.pb.h>
68
#include <ydb/core/protos/datashard_config.pb.h>
79

ydb/core/tx/schemeshard/schemeshard__operation_drop_cdc_stream.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#include "schemeshard__operation_iface.h"
33
#include "schemeshard__operation_common.h"
44

5+
#include "schemeshard_utils.h" // for TransactionTemplate
6+
57
#include "schemeshard__operation_drop_cdc_stream.h"
68

79
#define LOG_D(stream) LOG_DEBUG_S (context.Ctx, NKikimrServices::FLAT_TX_SCHEMESHARD, "[" << context.SS->SelfTabletId() << "] " << stream)

ydb/core/tx/schemeshard/schemeshard__operation_drop_index.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#include "schemeshard__operation_part.h"
22
#include "schemeshard__operation_iface.h"
33
#include "schemeshard__operation_common.h"
4-
#include "schemeshard_path_element.h"
4+
5+
#include "schemeshard_utils.h" // for TransactionTemplate
56

67
#include <ydb/core/base/path.h>
78
#include <ydb/core/protos/flat_tx_scheme.pb.h>

ydb/core/tx/schemeshard/schemeshard__operation_drop_pq.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#include "schemeshard__operation_iface.h"
33
#include "schemeshard__operation_common.h"
44

5+
#include "schemeshard_utils.h" // for PQGroupReserve
6+
57
#include <ydb/core/base/subdomain.h>
68
#include <ydb/core/persqueue/events/global.h>
79

ydb/core/tx/schemeshard/schemeshard__operation_iface.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
#include <ydb/core/external_sources/external_source_factory.h>
66
#include <ydb/core/tx/columnshard/bg_tasks/manager/manager.h>
77
#include <ydb/core/tx/schemeshard/olap/manager/manager.h>
8+
#include <ydb/core/tablet/tablet_counters.h>
89

910
#include "schemeshard_identificators.h"
1011
#include "schemeshard_path_element.h"
1112
#include "schemeshard_path.h"
12-
#include "schemeshard_utils.h"
1313

1414
#include "schemeshard_info_types.h"
1515
#include "schemeshard__operation.h"
@@ -55,15 +55,12 @@ struct TSchemeshardState : public IQuotaCounters {
5555
bool EnableExternalDataSourcesOnServerless = false;
5656
bool EnableParameterizedDecimal = false;
5757

58-
TShardDeleter ShardDeleter;
59-
6058
// ICB controls
6159
TControlWrapper DisablePublicationsOfDropping;
6260

6361
TSchemeshardState(ui64 selfTabletId, TActorId selfActorId)
6462
: SelfTabletId_(selfTabletId)
6563
, SelfActorId_(selfActorId)
66-
, ShardDeleter(selfTabletId)
6764
, DisablePublicationsOfDropping(0, 0, 1)
6865
{
6966
}

ydb/core/tx/schemeshard/schemeshard__operation_move_index.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#include "schemeshard__operation_iface.h"
33
#include "schemeshard__operation_common.h"
44

5+
#include "schemeshard_utils.h" // for TransactionTemplate
6+
57
#include <ydb/core/base/path.h>
68
#include <ydb/core/mind/hive/hive.h>
79
#include <ydb/core/protos/flat_tx_scheme.pb.h>

ydb/core/tx/schemeshard/schemeshard__operation_split_merge.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "schemeshard__operation_part.h"
22
#include "schemeshard__operation_iface.h"
33
#include "schemeshard__operation_common.h"
4+
#include "schemeshard_impl.h"
45

56
#include <ydb/core/base/subdomain.h>
67
#include <ydb/core/mind/hive/hive.h>
@@ -447,7 +448,7 @@ class TNotifySrc: public TSubOperationState {
447448
continue;
448449
}
449450

450-
if (!context.SS->ShardInfos.contains(shard.Idx) || context.SS->ShardDeleter.Has(shard.Idx)) {
451+
if (!context.SS->ShardInfos.contains(shard.Idx) || static_cast<TSchemeShard*>(context.SS)->ShardDeleter.Has(shard.Idx)) {
451452
LOG_DEBUG(context.Ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
452453
"Src datashard idx %" PRIu64 " for splitOp# %" PRIu64 " is already deleted or is intended to at tablet %" PRIu64,
453454
shard.Idx, OperationId.GetTxId(), context.SS->SelfTabletId());

ydb/core/tx/schemeshard/schemeshard_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4401,7 +4401,7 @@ TSchemeShard::TSchemeShard(const TActorId &tablet, TTabletStorageInfo *info)
44014401
, BackgroundCompactionStarter(this)
44024402
, BorrowedCompactionStarter(this)
44034403
, BackgroundCleaningStarter(this)
4404-
// , ShardDeleter(info->TabletID)
4404+
, ShardDeleter(info->TabletID)
44054405
, TableStatsQueue(this,
44064406
COUNTER_STATS_QUEUE_SIZE,
44074407
COUNTER_STATS_WRITTEN,

ydb/core/tx/schemeshard/schemeshard_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ class TSchemeShard
331331
// bool EnableExternalDataSourcesOnServerless = false;
332332
// bool EnableParameterizedDecimal = false;
333333

334-
// TShardDeleter ShardDeleter;
334+
TShardDeleter ShardDeleter;
335335

336336
// Counter-strike stuff
337337
// TTabletCountersBase* TabletCounters = nullptr;

ydb/core/tx/schemeshard/schemeshard_utils.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
#include "schemeshard_utils.h"
2-
31
#include <ydb/core/base/table_vector_index.h>
42
#include <ydb/core/mind/hive/hive.h>
53
#include <ydb/core/persqueue/utils.h>
64
#include <ydb/core/protos/counters_schemeshard.pb.h>
75

6+
#include "schemeshard.h"
7+
#include "schemeshard_info_types.h"
8+
9+
#include "schemeshard_utils.h"
10+
811
namespace NKikimr {
912
namespace NSchemeShard {
1013

@@ -555,7 +558,7 @@ bool ExtractTypes(const NKikimrSchemeOp::TTableDescription& baseTableDescr, TCol
555558

556559
NScheme::TTypeInfo typeInfo;
557560
if (!GetTypeInfo(typeRegistry->GetType(typeName), column.GetTypeInfo(), typeName, columnName, typeInfo, explain)) {
558-
return false;
561+
return false;
559562
}
560563

561564
columnTypes[columnName] = typeInfo;

ydb/core/tx/schemeshard/schemeshard_utils.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#pragma once
22

3+
#include <ydb/core/scheme_types/scheme_type_info.h> // for NScheme::TTypeInfo and NScheme::NTypeIds
4+
35
#include "schemeshard_types.h"
4-
#include "schemeshard_info_types.h"
6+
#include "schemeshard_info_types_fwd.h"
57

68
#include <ydb/core/tablet/tablet_counters.h>
79
#include <ydb/core/base/tablet_pipe.h>

0 commit comments

Comments
 (0)