diff --git a/src/yb/master/catalog_manager.cc b/src/yb/master/catalog_manager.cc index 78c093cfb9d0..58b109fd1fe8 100644 --- a/src/yb/master/catalog_manager.cc +++ b/src/yb/master/catalog_manager.cc @@ -3274,6 +3274,26 @@ Status CatalogManager::DdlLog( return sys_catalog_->FetchDdlLog(resp->mutable_entries()); } +Status CatalogManager::StartYsqlMajorVersionUpgradeInitdb( + const StartYsqlMajorVersionUpgradeInitdbRequestPB* req, + StartYsqlMajorVersionUpgradeInitdbResponsePB* resp, + rpc::RpcContext* rpc, const LeaderEpoch& epoch) { + return STATUS(NotSupported, "Ysql major version upgrade is not supported"); +} + +Status CatalogManager::IsYsqlMajorVersionUpgradeInitdbDone( + const IsYsqlMajorVersionUpgradeInitdbDoneRequestPB* req, + IsYsqlMajorVersionUpgradeInitdbDoneResponsePB* resp, rpc::RpcContext* rpc) { + return STATUS(NotSupported, "Ysql major version upgrade is not supported"); +} + +Status CatalogManager::RollbackYsqlMajorVersionUpgrade( + const RollbackYsqlMajorVersionUpgradeRequestPB* req, + RollbackYsqlMajorVersionUpgradeResponsePB* resp, + rpc::RpcContext* rpc, const LeaderEpoch& epoch) { + return STATUS(NotSupported, "Ysql major version upgrade is not supported"); +} + namespace { Status ValidateCreateTableSchema(const Schema& schema, CreateTableResponsePB* resp) { diff --git a/src/yb/master/catalog_manager.h b/src/yb/master/catalog_manager.h index a443a3c7294c..2a34a5056330 100644 --- a/src/yb/master/catalog_manager.h +++ b/src/yb/master/catalog_manager.h @@ -1098,6 +1098,21 @@ class CatalogManager : public tserver::TabletPeerLookupIf, Status DdlLog( const DdlLogRequestPB* req, DdlLogResponsePB* resp, rpc::RpcContext* rpc); + // Not implemented. + Status StartYsqlMajorVersionUpgradeInitdb(const StartYsqlMajorVersionUpgradeInitdbRequestPB* req, + StartYsqlMajorVersionUpgradeInitdbResponsePB* resp, + rpc::RpcContext* rpc, const LeaderEpoch& epoch); + + // Not implemented. + Status IsYsqlMajorVersionUpgradeInitdbDone( + const IsYsqlMajorVersionUpgradeInitdbDoneRequestPB* req, + IsYsqlMajorVersionUpgradeInitdbDoneResponsePB* resp, rpc::RpcContext* rpc); + + // Not implemented. + Status RollbackYsqlMajorVersionUpgrade(const RollbackYsqlMajorVersionUpgradeRequestPB* req, + RollbackYsqlMajorVersionUpgradeResponsePB* resp, + rpc::RpcContext* rpc, const LeaderEpoch& epoch); + // Test wrapper around protected DoSplitTablet method. Status TEST_SplitTablet( const TabletInfoPtr& source_tablet_info, diff --git a/src/yb/master/master_admin.proto b/src/yb/master/master_admin.proto index 5a3c544d7ced..43b8448e1630 100644 --- a/src/yb/master/master_admin.proto +++ b/src/yb/master/master_admin.proto @@ -177,6 +177,29 @@ message DdlLogResponsePB { repeated DdlLogEntryPB entries = 2; } +message StartYsqlMajorVersionUpgradeInitdbRequestPB { +} + +message StartYsqlMajorVersionUpgradeInitdbResponsePB { + optional MasterErrorPB error = 1; +} + +message IsYsqlMajorVersionUpgradeInitdbDoneRequestPB { +} + +message IsYsqlMajorVersionUpgradeInitdbDoneResponsePB { + optional MasterErrorPB error = 1; + optional bool done = 2; + optional MasterErrorPB initdb_error = 3; +} + +message RollbackYsqlMajorVersionUpgradeRequestPB { +} + +message RollbackYsqlMajorVersionUpgradeResponsePB { + optional MasterErrorPB error = 1; +} + message CheckIfPitrActiveRequestPB {} message CheckIfPitrActiveResponsePB { @@ -268,6 +291,13 @@ service MasterAdmin { rpc DdlLog(DdlLogRequestPB) returns (DdlLogResponsePB); + rpc StartYsqlMajorVersionUpgradeInitdb(StartYsqlMajorVersionUpgradeInitdbRequestPB) + returns (StartYsqlMajorVersionUpgradeInitdbResponsePB); + rpc IsYsqlMajorVersionUpgradeInitdbDone(IsYsqlMajorVersionUpgradeInitdbDoneRequestPB) + returns (IsYsqlMajorVersionUpgradeInitdbDoneResponsePB); + rpc RollbackYsqlMajorVersionUpgrade(RollbackYsqlMajorVersionUpgradeRequestPB) + returns (RollbackYsqlMajorVersionUpgradeResponsePB); + rpc CheckIfPitrActive(CheckIfPitrActiveRequestPB) returns (CheckIfPitrActiveResponsePB); diff --git a/src/yb/master/master_admin_service.cc b/src/yb/master/master_admin_service.cc index 417f27e30739..23748b73ec4c 100644 --- a/src/yb/master/master_admin_service.cc +++ b/src/yb/master/master_admin_service.cc @@ -49,6 +49,9 @@ class MasterAdminServiceImpl : public MasterServiceBase, public MasterAdminIf { (GetCompactionStatus) (CreateTransactionStatusTable) (DdlLog) + (StartYsqlMajorVersionUpgradeInitdb) + (IsYsqlMajorVersionUpgradeInitdbDone) + (RollbackYsqlMajorVersionUpgrade) (DeleteNotServingTablet) (FlushSysCatalog) (SplitTablet)