!4380 【资源池化】同步DMS点,DB同步删除db_is_primary对应的回调函数

Merge pull request !4380 from 董宁/sync10
This commit is contained in:
opengauss_bot
2023-11-03 01:17:40 +00:00
committed by Gitee
3 changed files with 16 additions and 14 deletions

View File

@ -367,11 +367,6 @@ static int CBSwitchoverDemote(void *db_handle)
return DMS_ERROR;
}
static int CBDbIsPrimary(void *db_handle)
{
return g_instance.dms_cxt.SSReformerControl.primaryInstId == SS_MY_INST_ID ? 1 : 0;
}
static int CBSwitchoverPromote(void *db_handle, unsigned char origPrimaryId)
{
g_instance.dms_cxt.SSClusterState = NODESTATE_STANDBY_PROMOTING;
@ -2163,7 +2158,6 @@ void DmsInitCallback(dms_callback_t *callback)
callback->switchover_demote = CBSwitchoverDemote;
callback->switchover_promote_opengauss = CBSwitchoverPromote;
callback->set_switchover_result = CBSwitchoverResult;
callback->db_is_primary = CBDbIsPrimary;
callback->reform_done_notify = CBReformDoneNotify;
callback->log_wait_flush = CBXLogWaitFlush;
callback->drc_validate = CBDrcBufValidate;

View File

@ -1,3 +1,3 @@
dms_commit_id=bf74f24da344d4cff3f48e94e8182ce0ee91cca6
dms_commit_id=3455e090f2e31208d8b0b92838bcaebb34b491c6
dss_commit_id=73210c606146e158c9199029556638b5d50306f4
cbb_commit_id=91717a56affc3d17658e8b3dc4e3c6efa2eeea7d

View File

@ -85,6 +85,8 @@ typedef enum en_dms_dr_type {
DMS_DR_TYPE_PROC = 23,
DMS_DR_TYPE_GDV = 24,
DMS_DR_TYPE_SEQVAL = 25,
DMS_DR_TYPE_SHARED_INNODE = 26,
DMS_DR_TYPE_PROC_ENTRY = 27,
DMS_DR_TYPE_MAX,
} dms_dr_type_t;
@ -143,10 +145,18 @@ typedef struct st_dms_drid {
struct {
unsigned short type; // lock type
unsigned short uid; // user id, for table lock resource
unsigned int oid; // lock id
unsigned int index; // index id
unsigned int parent_part; // parent partition id
unsigned int part; // partition id
union {
struct {
unsigned int oid; // lock id
unsigned int index; // index id
unsigned int parent_part; // parent partition id
unsigned int part; // partition id
};
struct {
unsigned long long oid_64;
unsigned long long unused;
};
};
};
};
} dms_drid_t;
@ -782,7 +792,6 @@ typedef int(*dms_ctl_rcy_clean_parallel_t)(void *db_handle, unsigned char thread
typedef unsigned char(*dms_ckpt_session)(void *db_handle);
typedef void (*dms_check_if_build_complete)(void *db_handle, unsigned int *build_complete);
typedef void (*dms_check_if_restore_recover)(void *db_handle, unsigned int *rst_recover);
typedef int (*dms_db_is_primary)(void *db_handle);
typedef void (*dms_set_switchover_result)(void *db_handle, int result);
typedef int (*dms_mount_to_recovery)(void *db_handle, unsigned int *has_offline);
typedef int(*dms_get_open_status)(void *db_handle);
@ -853,7 +862,6 @@ typedef struct st_dms_callback {
dms_recovery_analyse recovery_analyse;
dms_dw_recovery dw_recovery;
dms_df_recovery df_recovery;
dms_db_is_primary db_is_primary;
dms_get_open_status get_open_status;
dms_undo_init undo_init;
dms_tx_area_init tx_area_init;
@ -1056,7 +1064,7 @@ typedef enum en_dms_info_id {
#define DMS_LOCAL_MINOR_VER_WEIGHT 1000
#define DMS_LOCAL_MAJOR_VERSION 0
#define DMS_LOCAL_MINOR_VERSION 0
#define DMS_LOCAL_VERSION 104
#define DMS_LOCAL_VERSION 107
#ifdef __cplusplus
}
#endif