fix not init sequence id in session info bug
This commit is contained in:
@ -198,7 +198,8 @@ ObSQLSessionInfo::ObSQLSessionInfo(const uint64_t tenant_id) :
|
|||||||
vid_(OB_INVALID_ID),
|
vid_(OB_INVALID_ID),
|
||||||
vport_(0),
|
vport_(0),
|
||||||
in_bytes_(0),
|
in_bytes_(0),
|
||||||
out_bytes_(0)
|
out_bytes_(0),
|
||||||
|
current_dblink_sequence_id_(0)
|
||||||
{
|
{
|
||||||
MEMSET(tenant_buff_, 0, sizeof(share::ObTenantSpaceFetcher));
|
MEMSET(tenant_buff_, 0, sizeof(share::ObTenantSpaceFetcher));
|
||||||
MEMSET(vip_buf_, 0, sizeof(vip_buf_));
|
MEMSET(vip_buf_, 0, sizeof(vip_buf_));
|
||||||
@ -3862,6 +3863,12 @@ int ObSequenceCurrvalEncoder::display_sess_info(ObSQLSessionInfo &sess,
|
|||||||
}
|
}
|
||||||
if (OB_SUCC(ret)) {
|
if (OB_SUCC(ret)) {
|
||||||
OB_UNIS_DECODE(current_id);
|
OB_UNIS_DECODE(current_id);
|
||||||
|
if (current_id != sess.get_current_dblink_sequence_id()) {
|
||||||
|
found_mismatch = true;
|
||||||
|
share::ObTaskController::get().allow_next_syslog();
|
||||||
|
LOG_WARN("current dblink sequence id mismatch",
|
||||||
|
"current_seq_id", current_id, "last_seq_id", sess.get_current_dblink_sequence_id());
|
||||||
|
}
|
||||||
OB_UNIS_DECODE(map_size);
|
OB_UNIS_DECODE(map_size);
|
||||||
ObDBlinkSequenceIdMap &id_map = sess.get_dblink_sequence_id_map();
|
ObDBlinkSequenceIdMap &id_map = sess.get_dblink_sequence_id_map();
|
||||||
if (map_size != id_map.size()) {
|
if (map_size != id_map.size()) {
|
||||||
|
|||||||
@ -1354,7 +1354,6 @@ private:
|
|||||||
ObPackageStateMap package_state_map_;
|
ObPackageStateMap package_state_map_;
|
||||||
ObSequenceCurrvalMap sequence_currval_map_;
|
ObSequenceCurrvalMap sequence_currval_map_;
|
||||||
ObDBlinkSequenceIdMap dblink_sequence_id_map_;
|
ObDBlinkSequenceIdMap dblink_sequence_id_map_;
|
||||||
int64_t current_dblink_sequence_id_;
|
|
||||||
ObContextsMap contexts_map_;
|
ObContextsMap contexts_map_;
|
||||||
int64_t curr_session_context_size_;
|
int64_t curr_session_context_size_;
|
||||||
|
|
||||||
@ -1505,6 +1504,7 @@ private:
|
|||||||
int32_t vport_;
|
int32_t vport_;
|
||||||
int64_t in_bytes_;
|
int64_t in_bytes_;
|
||||||
int64_t out_bytes_;
|
int64_t out_bytes_;
|
||||||
|
int64_t current_dblink_sequence_id_;
|
||||||
common::ObSEArray<ObSequenceSchema*, 2> dblink_sequence_schemas_;
|
common::ObSEArray<ObSequenceSchema*, 2> dblink_sequence_schemas_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user