BUGFIX: ddl only wait trans with a smaller schema version
This commit is contained in:
@ -344,7 +344,7 @@ int ObLockMemCtx::check_modify_schema_elapsed(
|
||||
RDLockGuard guard(list_rwlock_);
|
||||
DLIST_FOREACH(curr, lock_list_) {
|
||||
if (curr->lock_op_.lock_id_ == lock_id &&
|
||||
curr->lock_op_.create_schema_version_ <= schema_version) {
|
||||
curr->lock_op_.create_schema_version_ < schema_version) {
|
||||
// there is some trans that modify the tablet before schema version
|
||||
// running.
|
||||
ret = OB_EAGAIN;
|
||||
@ -370,7 +370,7 @@ int ObLockMemCtx::check_modify_time_elapsed(
|
||||
RDLockGuard guard(list_rwlock_);
|
||||
DLIST_FOREACH(curr, lock_list_) {
|
||||
if (curr->lock_op_.lock_id_ == lock_id &&
|
||||
curr->lock_op_.create_timestamp_ <= timestamp) {
|
||||
curr->lock_op_.create_timestamp_ < timestamp) {
|
||||
// there is some trans that modify the tablet before timestamp
|
||||
// running.
|
||||
ret = OB_EAGAIN;
|
||||
|
@ -89,9 +89,11 @@ public:
|
||||
const ObTableLockOpType op_type,
|
||||
bool &is_exist,
|
||||
ObTableLockMode &lock_mode_in_same_trans) const;
|
||||
// wait all the trans that modify with a smaller schema_version finished.
|
||||
int check_modify_schema_elapsed(
|
||||
const ObLockID &lock_id,
|
||||
const int64_t schema_version);
|
||||
// wait all the trans that modify with a smaller timestamp finished.
|
||||
int check_modify_time_elapsed(
|
||||
const ObLockID &lock_id,
|
||||
const int64_t timestamp);
|
||||
|
Reference in New Issue
Block a user