[4.0] add print_memtable_for_tablet for debug
This commit is contained in:
parent
e30a640634
commit
3f4864a69b
@ -951,6 +951,7 @@ int ObTabletBindingHelper::set_scn(ObTabletHandle &handle, const ObMulSourceData
|
||||
LOG_WARN("failed to get data", K(ret));
|
||||
} else if (OB_UNLIKELY(data.tx_id_ != tx_id)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
ObTabletCreateDeleteHelper::print_memtables_for_table(handle);
|
||||
LOG_WARN("cannot set log ts for unlocked tablet", K(ret), K(tx_id), K(data), "tablet_id", tablet->get_tablet_meta().tablet_id_);
|
||||
} else if (OB_UNLIKELY(!data.tx_scn_.is_valid())) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
@ -1050,6 +1051,7 @@ int ObTabletBindingHelper::unlock_tablet_binding(ObTabletHandle &handle, const O
|
||||
} else {
|
||||
const ObTabletMeta &tablet_meta = tablet->get_tablet_meta();
|
||||
LOG_WARN("already unlocked or bug", K(ret), K(tablet_meta), K(scn), K(trans_flags), K(tx_data));
|
||||
ObTabletCreateDeleteHelper::print_memtables_for_table(handle);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
|
@ -639,6 +639,7 @@ int ObTabletCreateDeleteHelper::do_commit_create_tablet(
|
||||
} else if (OB_UNLIKELY(trans_flags.tx_id_ != tx_data.tx_id_)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("tx id does not equal", K(ret), K(key), K(trans_flags), K(tx_data));
|
||||
print_memtables_for_table(tablet_handle);
|
||||
} else if (OB_UNLIKELY(ObTabletStatus::CREATING != tx_data.tablet_status_)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("tablet status is not CREATING", K(ret), K(key), K(trans_flags), K(tx_data));
|
||||
@ -923,6 +924,7 @@ int ObTabletCreateDeleteHelper::do_abort_create_tablet(
|
||||
} else if (OB_UNLIKELY(trans_flags.tx_id_ != tx_data.tx_id_)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("tx id does not equal", K(ret), K(tablet_id), K(trans_flags), K(tx_data));
|
||||
print_memtables_for_table(tablet_handle);
|
||||
} else if (OB_UNLIKELY(ObTabletStatus::CREATING != tx_data.tablet_status_)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("tablet status is not CREATING", K(ret), K(tablet_id), K(trans_flags), K(tx_data));
|
||||
@ -1159,6 +1161,7 @@ int ObTabletCreateDeleteHelper::do_commit_remove_tablet(
|
||||
} else if (OB_UNLIKELY(trans_flags.tx_id_ != tx_data.tx_id_)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("tx id does not equal", K(ret), K(key), K(trans_flags), K(tx_data));
|
||||
print_memtables_for_table(tablet_handle);
|
||||
} else if (OB_UNLIKELY(ObTabletStatus::DELETING != tx_data.tablet_status_)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("tablet status is not DELETING", K(ret), K(key), K(trans_flags), K(tx_data));
|
||||
@ -1256,6 +1259,7 @@ int ObTabletCreateDeleteHelper::do_abort_remove_tablet(
|
||||
} else if (OB_UNLIKELY(trans_flags.tx_id_ != tx_data.tx_id_)) {
|
||||
is_valid = false;
|
||||
LOG_INFO("tx id does not equal", K(ret), K(key), K(trans_flags), K(tx_data));
|
||||
print_memtables_for_table(tablet_handle);
|
||||
} else if (OB_UNLIKELY(ObTabletStatus::DELETING != tx_data.tablet_status_)) {
|
||||
is_valid = false;
|
||||
LOG_INFO("tablet status is not DELETING", K(ret), K(key), K(trans_flags), K(tx_data));
|
||||
@ -2534,5 +2538,19 @@ int ObTabletCreateDeleteHelper::prepare_data_for_binding_info(const ObTabletID &
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ObTabletCreateDeleteHelper::print_memtables_for_table(ObTabletHandle &tablet_handle)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
common::ObSArray<storage::ObITable *> memtables;
|
||||
if (!tablet_handle.is_valid()) {
|
||||
ret = OB_INVALID_ARGUMENT;
|
||||
LOG_WARN("tablet_handle is not valid", K(ret), K(tablet_handle));
|
||||
} else if (OB_FAIL(tablet_handle.get_obj()->get_memtables(memtables, true))) {
|
||||
LOG_WARN("failed to get_memtables", K(ret), K(tablet_handle));
|
||||
} else {
|
||||
LOG_INFO("memtables print", K(memtables), K(tablet_handle));
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace storage
|
||||
} // namespace oceanbase
|
||||
|
@ -150,6 +150,7 @@ public:
|
||||
static int prepare_data_for_tablet_status(const ObTabletID &tablet_id, const ObLS &ls, const transaction::ObMulSourceDataNotifyArg &trans_flags);
|
||||
|
||||
static int prepare_data_for_binding_info(const ObTabletID &tablet_id, const ObLS &ls, const transaction::ObMulSourceDataNotifyArg &trans_flags);
|
||||
static void print_memtables_for_table(ObTabletHandle &tablet_handle);
|
||||
private:
|
||||
static int verify_tablets_absence(
|
||||
const obrpc::ObBatchCreateTabletArg &arg,
|
||||
|
Loading…
x
Reference in New Issue
Block a user