Skip to content

Introduce scheme operation factory #14229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ydb/apps/ydbd/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "export.h"
#include <ydb/core/driver_lib/run/main.h>
#include <ydb/core/security/ticket_parser.h>
#include <ydb/core/tx/schemeshard/schemeshard_operation_factory.h>
#include <ydb/core/ymq/actor/auth_multi_factory.h>
#include <ydb/core/ymq/base/events_writer.h>
#include <ydb/library/folder_service/folder_service.h>
Expand All @@ -20,6 +21,7 @@ int main(int argc, char **argv) {
factories->AdditionalComputationNodeFactories = { NYql::GetPgFactory() };
factories->SqsAuthFactory = std::make_shared<NKikimr::NSQS::TMultiAuthFactory>();
factories->SqsEventsWriterFactory = std::make_shared<TSqsEventsWriterFactory>();
factories->SchemeOperationFactory.reset(NKikimr::NSchemeShard::DefaultOperationFactory());

return ParameterizedMain(argc, argv, std::move(factories));
}
1 change: 1 addition & 0 deletions ydb/apps/ydbd/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ PEERDIR(
ydb/core/driver_lib/run
ydb/core/protos
ydb/core/security
ydb/core/tx/schemeshard
ydb/core/ymq/actor
ydb/core/ymq/base
ydb/library/folder_service/mock
Expand Down
5 changes: 5 additions & 0 deletions ydb/core/base/appdata_fwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ namespace NPQ {
class IPersQueueMirrorReaderFactory;
}

namespace NSchemeShard {
class IOperationFactory;
}

class TFormatFactory;

struct TAppData {
Expand All @@ -167,6 +171,7 @@ struct TAppData {
const NDataShard::IExportFactory *DataShardExportFactory = nullptr;
const TFormatFactory* FormatFactory = nullptr;
const NSQS::IEventsWriterFactory* SqsEventsWriterFactory = nullptr;
const NSchemeShard::IOperationFactory *SchemeOperationFactory = nullptr;

NSQS::IAuthFactory* SqsAuthFactory = nullptr;

Expand Down
3 changes: 3 additions & 0 deletions ydb/core/driver_lib/run/factories.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <ydb/core/blobstorage/pdisk/blobstorage_pdisk_util_devicemode.h>
#include <ydb/core/kqp/common/kqp.h>
#include <ydb/core/tx/datashard/export_iface.h>
#include <ydb/core/tx/schemeshard/schemeshard_operation_factory.h>
#include <ydb/core/persqueue/actor_persqueue_client_iface.h>
#include <ydb/core/protos/auth.pb.h>
#include <ydb/core/base/grpc_service_factory.h>
Expand Down Expand Up @@ -40,6 +41,8 @@ struct TModuleFactories {
std::shared_ptr<NDataShard::IExportFactory> DataShardExportFactory;
// Factory for Simple queue services implementation details
std::shared_ptr<NSQS::IEventsWriterFactory> SqsEventsWriterFactory;
// Scheme operations
std::shared_ptr<NSchemeShard::IOperationFactory> SchemeOperationFactory;

IActor*(*CreateTicketParser)(const TTicketParserSettings&);
IActor*(*FolderServiceFactory)(const NKikimrProto::NFolderService::TFolderServiceConfig&);
Expand Down
1 change: 1 addition & 0 deletions ydb/core/driver_lib/run/run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,7 @@ void TKikimrRunner::InitializeAppData(const TKikimrRunConfig& runConfig)
AppData->PersQueueMirrorReaderFactory = ModuleFactories ? ModuleFactories->PersQueueMirrorReaderFactory.get() : nullptr;
AppData->PersQueueGetReadSessionsInfoWorkerFactory = ModuleFactories ? ModuleFactories->PQReadSessionsInfoWorkerFactory.get() : nullptr;
AppData->IoContextFactory = ModuleFactories ? ModuleFactories->IoContextFactory.get() : nullptr;
AppData->SchemeOperationFactory = ModuleFactories ? ModuleFactories->SchemeOperationFactory.get() : nullptr;

AppData->SqsAuthFactory = ModuleFactories
? ModuleFactories->SqsAuthFactory.get()
Expand Down
1 change: 1 addition & 0 deletions ydb/core/testlib/actors/test_runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ namespace NActors {
nodeAppData->GraphConfig = app0->GraphConfig;
nodeAppData->EnableMvccSnapshotWithLegacyDomainRoot = app0->EnableMvccSnapshotWithLegacyDomainRoot;
nodeAppData->IoContextFactory = app0->IoContextFactory;
nodeAppData->SchemeOperationFactory = app0->SchemeOperationFactory;
if (nodeIndex < egg.Icb.size()) {
nodeAppData->Icb = std::move(egg.Icb[nodeIndex]);
nodeAppData->InFlightLimiterRegistry.Reset(new NKikimr::NGRpcService::TInFlightLimiterRegistry(nodeAppData->Icb));
Expand Down
2 changes: 2 additions & 0 deletions ydb/core/testlib/basics/appdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ namespace NKikimr {
Mine->Types->CalculateMetadataEtag();
Mine->DataShardExportFactory = ef;
Mine->IoContext = std::make_shared<NPDisk::TIoContextFactoryOSS>();
Mine->SchemeOperationFactory.reset(NSchemeShard::DefaultOperationFactory());

Domains = new TDomainsInfo;
}
Expand All @@ -38,6 +39,7 @@ namespace NKikimr {
auto *app = new TAppData(0, 0, 0, 0, { }, Mine->Types.Get(), Mine->Funcs.Get(), Mine->Formats.Get(), nullptr);
app->DataShardExportFactory = Mine->DataShardExportFactory.get();
app->IoContextFactory = Mine->IoContext.get();
app->SchemeOperationFactory = Mine->SchemeOperationFactory.get();

app->DomainsInfo = std::move(Domains);
app->ChannelProfiles = Channels ? Channels : new TChannelProfiles;
Expand Down
2 changes: 2 additions & 0 deletions ydb/core/testlib/basics/appdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <ydb/core/testlib/actors/test_runtime.h>
#include <ydb/core/tx/datashard/export_iface.h>
#include <ydb/core/tx/datashard/export_s3.h>
#include <ydb/core/tx/schemeshard/schemeshard_operation_factory.h>
#include <ydb/core/protos/blobstorage.pb.h>
#include <ydb/core/protos/config.pb.h>
#include <ydb/core/protos/datashard_config.pb.h>
Expand Down Expand Up @@ -57,6 +58,7 @@ namespace NKikimr {
TIntrusivePtr<TFormatFactory> Formats;
std::shared_ptr<NDataShard::IExportFactory> DataShardExportFactory;
std::shared_ptr<NPDisk::IIoContextFactory> IoContext;
std::shared_ptr<NSchemeShard::IOperationFactory> SchemeOperationFactory;

~TMine();
};
Expand Down
1 change: 1 addition & 0 deletions ydb/core/testlib/basics/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ PEERDIR(
ydb/core/testlib/actors
ydb/core/tx/columnshard
ydb/core/tx/scheme_board
ydb/core/tx/schemeshard
ydb/core/util
yql/essentials/minikql/invoke_builtins/llvm14
yql/essentials/public/udf/service/exception_policy
Expand Down
Loading
Loading