diff --git a/src/gausskernel/ddes/adapter/ss_dms_bufmgr.cpp b/src/gausskernel/ddes/adapter/ss_dms_bufmgr.cpp index e761a2d43..9ee36fc18 100644 --- a/src/gausskernel/ddes/adapter/ss_dms_bufmgr.cpp +++ b/src/gausskernel/ddes/adapter/ss_dms_bufmgr.cpp @@ -63,11 +63,11 @@ void InitDmsContext(dms_context_t *dmsContext) dmsContext->sess_id = (unsigned int)(t_thrd.proc ? t_thrd.proc->logictid : t_thrd.myLogicTid + TotalProcs); dmsContext->db_handle = t_thrd.proc; if (AmDmsReformProcProcess()) { - dmsContext->sess_rcy = DMS_SESSION_IN_REFORM; + dmsContext->sess_type = DMS_SESSION_REFORM; } else if (AmPageRedoProcess() || AmStartupProcess()) { - dmsContext->sess_rcy = DMS_SESSION_IN_RECOVERY; + dmsContext->sess_type = DMS_SESSION_RECOVER; } else { - dmsContext->sess_rcy = DMS_SESSION_NORMAL; + dmsContext->sess_type = DMS_SESSION_NORMAL; } dmsContext->is_try = 0; } diff --git a/src/gausskernel/ddes/ddes_commit_id b/src/gausskernel/ddes/ddes_commit_id index e8b6c0128..140a2d11f 100644 --- a/src/gausskernel/ddes/ddes_commit_id +++ b/src/gausskernel/ddes/ddes_commit_id @@ -1,2 +1,2 @@ -dms_commit_id=1f7a138cbdd57becb8c26a16688d5dfd9d71b029 +dms_commit_id=9e5e5c1f2efc071f8ec3ca884ad9331a3ed257ec dss_commit_id=5444f9b4715bd78c9c6b4757475e07ac6398ed6e \ No newline at end of file diff --git a/src/include/ddes/dms/dms_api.h b/src/include/ddes/dms/dms_api.h index 461409677..ac6836a23 100644 --- a/src/include/ddes/dms/dms_api.h +++ b/src/include/ddes/dms/dms_api.h @@ -156,6 +156,12 @@ typedef enum en_drc_res_type { DRC_RES_LOCK_ITEM_TYPE, } drc_res_type_e; +typedef enum en_dms_session { + DMS_SESSION_NORMAL = 0, // can not access DRC when DRC is inaccessible + DMS_SESSION_REFORM = 1, // can access DRC when DRC is inaccessible + DMS_SESSION_RECOVER = 2, // can access DRC when DRC is inaccessible, buf if no owner, should set in recovery +} dms_session_e; + #define DMS_RESID_SIZE 32 #define DMS_DRID_SIZE sizeof(dms_drid_t) @@ -183,8 +189,7 @@ typedef struct st_dms_xmap_ctx { typedef struct st_dms_context { unsigned int inst_id; // current instance id unsigned int sess_id; // current session id - unsigned int sess_rcy; // request page: recovery session flag - + dms_session_e sess_type; // request page: recovery session flag void *db_handle; unsigned char is_try; unsigned char type; @@ -230,6 +235,8 @@ typedef struct dms_opengauss_txn_snapshot { } dms_opengauss_txn_snapshot_t; typedef enum dms_opengauss_lock_req_type { + SHARED_INVAL_MSG, + DROP_BUF_MSG, LOCK_NORMAL_MODE, LOCK_RELEASE_SELF, LOCK_REACQUIRE, @@ -772,7 +779,7 @@ typedef struct st_logger_param { #define DMS_LOCAL_MINOR_VER_WEIGHT 1000 #define DMS_LOCAL_MAJOR_VERSION 0 #define DMS_LOCAL_MINOR_VERSION 0 -#define DMS_LOCAL_VERSION 43 +#define DMS_LOCAL_VERSION 44 #ifdef __cplusplus } diff --git a/src/include/ddes/dms/ss_common_attr.h b/src/include/ddes/dms/ss_common_attr.h index e45190e4e..6c351b261 100644 --- a/src/include/ddes/dms/ss_common_attr.h +++ b/src/include/ddes/dms/ss_common_attr.h @@ -156,8 +156,5 @@ typedef enum SSReformType { DMS_REFORM_TYPE_FOR_MAINTAIN } SSReformType; -#define DMS_SESSION_NORMAL 0 -#define DMS_SESSION_IN_REFORM 1 -#define DMS_SESSION_IN_RECOVERY 2 #endif