[tx-route] fix extra state isolation field verify failed
This commit is contained in:
@ -1590,8 +1590,14 @@ int ObSqlTransControl::check_ls_readable(const uint64_t tenant_id,
|
|||||||
int ObSqlTransControl::cmp_txn_##name##_state(const char* cur_buf, int64_t cur_len, const char* last_buf, int64_t last_len) \
|
int ObSqlTransControl::cmp_txn_##name##_state(const char* cur_buf, int64_t cur_len, const char* last_buf, int64_t last_len) \
|
||||||
{ return transaction::ObTransService::txn_free_route__cmp_##name##_state(cur_buf, cur_len, last_buf, last_len); } \
|
{ return transaction::ObTransService::txn_free_route__cmp_##name##_state(cur_buf, cur_len, last_buf, last_len); } \
|
||||||
void ObSqlTransControl::display_txn_##name##_state(ObSQLSessionInfo &sess, const char* local_buf, const int64_t local_len, const char* remote_buf, const int64_t remote_len) \
|
void ObSqlTransControl::display_txn_##name##_state(ObSQLSessionInfo &sess, const char* local_buf, const int64_t local_len, const char* remote_buf, const int64_t remote_len) \
|
||||||
{ transaction::ObTransService::txn_free_route__display_##name##_state("LOAL", local_buf, local_len); \
|
{ \
|
||||||
transaction::ObTransService::txn_free_route__display_##name##_state("REMOTE", remote_buf, remote_len); }
|
transaction::ObTransService::txn_free_route__display_##name##_state("LOAL", local_buf, local_len); \
|
||||||
|
transaction::ObTransService::txn_free_route__display_##name##_state("REMOTE", remote_buf, remote_len); \
|
||||||
|
ObTxDesc *tx = sess.get_tx_desc(); \
|
||||||
|
if (OB_NOT_NULL(tx)) { \
|
||||||
|
tx->print_trace(); \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
|
||||||
DELEGATE_TO_TXN(static);
|
DELEGATE_TO_TXN(static);
|
||||||
DELEGATE_TO_TXN(dynamic);
|
DELEGATE_TO_TXN(dynamic);
|
||||||
|
|||||||
@ -21,6 +21,15 @@ namespace transaction {
|
|||||||
FLAG flags_ = { .v_ = 0 }; \
|
FLAG flags_ = { .v_ = 0 }; \
|
||||||
bool can_elr_ = false; \
|
bool can_elr_ = false; \
|
||||||
int abort_cause_ = 0;
|
int abort_cause_ = 0;
|
||||||
|
|
||||||
|
// only serialize isolation_ when Repeatable Read or SERIALIZABLE
|
||||||
|
#define PRE_ENCODE_EXTRA_FOR_VERIFY \
|
||||||
|
ObTxIsolationLevel isolation_ = ObTxIsolationLevel::INVALID; \
|
||||||
|
if (this->isolation_ == ObTxIsolationLevel::RR \
|
||||||
|
|| this->isolation_ == ObTxIsolationLevel::SERIAL) { \
|
||||||
|
isolation_ = this->isolation_; \
|
||||||
|
}
|
||||||
|
|
||||||
#define PRE_STATIC_DECODE
|
#define PRE_STATIC_DECODE
|
||||||
#define POST_STATIC_DECODE
|
#define POST_STATIC_DECODE
|
||||||
// bookkeep the original before update, then after receive the update,
|
// bookkeep the original before update, then after receive the update,
|
||||||
@ -136,7 +145,7 @@ TXN_FREE_ROUTE_MEMBERS(parts,,,,
|
|||||||
// the fields 'dup with static' are required when preceding of txn is of query like
|
// the fields 'dup with static' are required when preceding of txn is of query like
|
||||||
// savepoint or read only stmt with isolation of SERIALIZABLE / REPEATABLE READ
|
// savepoint or read only stmt with isolation of SERIALIZABLE / REPEATABLE READ
|
||||||
// because such type of query caused the txn into 'start' in perspective of proxy
|
// because such type of query caused the txn into 'start' in perspective of proxy
|
||||||
TXN_FREE_ROUTE_MEMBERS(extra, , PRE_EXTRA_DECODE, POST_EXTRA_DECODE,
|
TXN_FREE_ROUTE_MEMBERS(extra, PRE_ENCODE_EXTRA_FOR_VERIFY, PRE_EXTRA_DECODE, POST_EXTRA_DECODE,
|
||||||
tx_id_, // dup with static
|
tx_id_, // dup with static
|
||||||
sess_id_, // dup with static
|
sess_id_, // dup with static
|
||||||
addr_, // dup with static
|
addr_, // dup with static
|
||||||
|
|||||||
Reference in New Issue
Block a user