adjust mds time guard timeout & fix some minor issue
This commit is contained in:
@ -188,9 +188,12 @@ void ObTabletMediumCompactionInfoRecorder::free_allocated_info()
|
||||
if (OB_NOT_NULL(allocator_)) {
|
||||
if (OB_NOT_NULL(logcb_ptr_)) {
|
||||
logcb_ptr_->~ObStorageCLogCb();
|
||||
|
||||
tablet_handle_ptr_->reset();
|
||||
tablet_handle_ptr_->~ObTabletHandle();
|
||||
mds_ctx_->~MdsCtx();
|
||||
|
||||
mds_ctx_->mds::MdsCtx::~MdsCtx();
|
||||
|
||||
allocator_->free(logcb_ptr_);
|
||||
logcb_ptr_ = nullptr;
|
||||
tablet_handle_ptr_ = nullptr;
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
~ObTabletMediumCompactionInfoRecorder();
|
||||
int init(
|
||||
const share::ObLSID &ls_id,
|
||||
const ObTabletID &tablet_id,
|
||||
const common::ObTabletID &tablet_id,
|
||||
const int64_t max_saved_version,
|
||||
logservice::ObLogHandler *log_handler);
|
||||
virtual void destroy() override;
|
||||
@ -77,7 +77,7 @@ private:
|
||||
bool is_inited_;
|
||||
bool ignore_medium_;
|
||||
share::ObLSID ls_id_;
|
||||
ObTabletID tablet_id_;
|
||||
common::ObTabletID tablet_id_;
|
||||
storage::ObTabletHandle *tablet_handle_ptr_;
|
||||
ObMediumCompactionInfo *medium_info_;
|
||||
common::ObIAllocator *allocator_;
|
||||
|
@ -974,9 +974,7 @@ int ObTabletTableBackfillTXTask::update_merge_sstable_()
|
||||
is_major_merge_type(tablet_merge_ctx_.param_.merge_type_),
|
||||
tablet_merge_ctx_.merged_sstable_.get_end_scn());
|
||||
|
||||
if (OB_FAIL(ret)) {
|
||||
} else if (OB_FAIL(ls->update_tablet_table_store(
|
||||
tablet_id_, param, new_tablet_handle))) {
|
||||
if (OB_FAIL(ls->update_tablet_table_store(tablet_id_, param, new_tablet_handle))) {
|
||||
LOG_WARN("failed to update tablet table store", K(ret), K(param));
|
||||
} else if (is_mini_merge(tablet_merge_ctx_.param_.merge_type_)) {
|
||||
if (OB_FAIL(new_tablet_handle.get_obj()->release_memtables(tablet_merge_ctx_.scn_range_.end_scn_))) {
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "storage/tx_storage/ob_ls_service.h"
|
||||
#include "ob_storage_ha_dag.h"
|
||||
#include "storage/compaction/ob_tablet_merge_ctx.h"
|
||||
#include "storage/memtable/ob_multi_source_data.h"
|
||||
|
||||
namespace oceanbase
|
||||
{
|
||||
|
@ -504,9 +504,9 @@ int ObTenantMetaMemMgr::gc_tables_in_queue(bool &all_table_cleaned)
|
||||
int64_t tablets_mem_limit = 0;
|
||||
ObMallocAllocator *alloc = ObMallocAllocator::get_instance();
|
||||
if (OB_NOT_NULL(alloc)) {
|
||||
auto ta = alloc->get_tenant_ctx_allocator(MTL_ID(), ObCtxIds::META_OBJ_CTX_ID);
|
||||
if (OB_NOT_NULL(ta)) {
|
||||
tablets_mem_limit = ta->get_limit();
|
||||
const ObTenantCtxAllocatorGuard &ag = alloc->get_tenant_ctx_allocator(MTL_ID(), ObCtxIds::META_OBJ_CTX_ID);
|
||||
if (OB_NOT_NULL(ag)) {
|
||||
tablets_mem_limit = ag->get_limit();
|
||||
}
|
||||
}
|
||||
|
||||
@ -844,7 +844,7 @@ int ObTenantMetaMemMgr::get_min_end_scn_for_ls(
|
||||
LOG_WARN("tablet ptr is NULL", K(ret), K(ptr_handle));
|
||||
} else if (OB_ISNULL(tablet = tablet_ptr->old_version_chain_)) { // skip
|
||||
} else {
|
||||
// since the last tablet may not be the oldest, we traverse the wholo chain
|
||||
// since the last tablet may not be the oldest, we traverse the whole chain
|
||||
while (OB_SUCC(ret) && OB_NOT_NULL(tablet)) {
|
||||
if (OB_FAIL(get_min_end_scn_from_single_tablet(tablet, true/*is_old*/, ls_checkpoint, min_end_scn_from_old))) {
|
||||
LOG_WARN("fail to get min end scn from old tablet", K(ret), KP(tablet));
|
||||
|
@ -82,6 +82,7 @@ int ObMdsTableMergeTask::process()
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("ctx is unexpected null", K(ret), KP(ctx), KPC(mds_merge_dag_));
|
||||
} else {
|
||||
ctx->start_time_ = ObTimeUtility::fast_current_time();
|
||||
int tmp_ret = OB_SUCCESS;
|
||||
ObLS *ls = nullptr;
|
||||
ObTablet *tablet = nullptr;
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "lib/ob_replica_define.h"
|
||||
#include "common/ob_store_range.h"
|
||||
#include "common/ob_member_list.h"
|
||||
#include "share/scn.h"
|
||||
#include "share/ob_tablet_autoincrement_param.h"
|
||||
#include "share/schema/ob_schema_struct.h"
|
||||
#include "share/schema/ob_table_schema.h"
|
||||
@ -25,10 +26,6 @@
|
||||
#include "storage/tablet/ob_tablet_table_store_flag.h"
|
||||
#include "storage/compaction/ob_compaction_util.h"
|
||||
#include "storage/compaction/ob_medium_compaction_mgr.h"
|
||||
#include "share/scn.h"
|
||||
#include "storage/tablet/ob_tablet_multi_source_data.h"
|
||||
#include "storage/tablet/ob_tablet_binding_helper.h"
|
||||
#include "storage/tablet/ob_tablet_binding_info.h"
|
||||
#include "storage/ddl/ob_ddl_struct.h"
|
||||
#include "storage/high_availability/ob_tablet_ha_status.h"
|
||||
|
||||
|
@ -167,11 +167,6 @@ int ObTabletCreateMdsHelper::on_replay(
|
||||
int ret = OB_SUCCESS;
|
||||
ObBatchCreateTabletArg arg;
|
||||
int64_t pos = 0;
|
||||
common::ObSArray<ObTabletID> tablet_id_array;
|
||||
const ObLSID &ls_id = arg.id_;
|
||||
ObLSHandle ls_handle;
|
||||
ObLS *ls = nullptr;
|
||||
share::SCN tablet_change_checkpoint_scn;
|
||||
|
||||
if (OB_ISNULL(buf) || OB_UNLIKELY(len <= 0) || OB_UNLIKELY(!scn.is_valid())) {
|
||||
ret = OB_INVALID_ARGUMENT;
|
||||
@ -344,8 +339,6 @@ int ObTabletCreateMdsHelper::create_tablets(
|
||||
{
|
||||
MDS_TG(10_ms);
|
||||
int ret = OB_SUCCESS;
|
||||
ObLSHandle ls_handle;
|
||||
ObLS *ls = nullptr;
|
||||
|
||||
for (int64_t i = 0; OB_SUCC(ret) && i < arg.tablets_.count(); ++i) {
|
||||
const ObCreateTabletInfo &info = arg.tablets_.at(i);
|
||||
@ -640,7 +633,7 @@ int ObTabletCreateMdsHelper::build_mixed_tablets(
|
||||
mds::BufferCtx &ctx,
|
||||
common::ObIArray<common::ObTabletID> &tablet_id_array)
|
||||
{
|
||||
MDS_TG(500_ms);
|
||||
MDS_TG(10_ms);
|
||||
int ret = OB_SUCCESS;
|
||||
const ObLSID &ls_id = arg.id_;
|
||||
const ObTabletID &data_tablet_id = info.data_tablet_id_;
|
||||
@ -732,7 +725,7 @@ int ObTabletCreateMdsHelper::build_pure_aux_tablets(
|
||||
mds::BufferCtx &ctx,
|
||||
common::ObIArray<common::ObTabletID> &tablet_id_array)
|
||||
{
|
||||
MDS_TG(500_ms);
|
||||
MDS_TG(10_ms);
|
||||
int ret = OB_SUCCESS;
|
||||
const ObLSID &ls_id = arg.id_;
|
||||
const ObTabletID &data_tablet_id = info.data_tablet_id_;
|
||||
@ -802,7 +795,7 @@ int ObTabletCreateMdsHelper::build_hidden_tablets(
|
||||
mds::BufferCtx &ctx,
|
||||
common::ObIArray<common::ObTabletID> &tablet_id_array)
|
||||
{
|
||||
MDS_TG(500_ms);
|
||||
MDS_TG(10_ms);
|
||||
int ret = OB_SUCCESS;
|
||||
const ObLSID &ls_id = arg.id_;
|
||||
const ObTabletID &data_tablet_id = info.data_tablet_id_;
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "lib/utility/serialization.h"
|
||||
#include "share/scn.h"
|
||||
#include "share/schema/ob_table_schema.h"
|
||||
#include "storage/tablet/ob_tablet_binding_info.h"
|
||||
#include "storage/tablet/ob_tablet_create_delete_mds_user_data.h"
|
||||
|
||||
namespace oceanbase
|
||||
|
@ -748,7 +748,7 @@ int ObTabletStartTransferInHelper::check_transfer_dest_tablets_(
|
||||
const ObTXStartTransferInInfo &tx_start_transfer_in_info,
|
||||
const bool for_replay)
|
||||
{
|
||||
MDS_TG(500_ms);
|
||||
MDS_TG(10_ms);
|
||||
int ret = OB_SUCCESS;
|
||||
ObLSHandle ls_handle;
|
||||
ObLSService *ls_service = nullptr;
|
||||
@ -911,7 +911,7 @@ int ObTabletStartTransferInHelper::check_transfer_src_tablets_(
|
||||
const bool for_replay,
|
||||
const ObTXStartTransferInInfo &tx_start_transfer_in_info)
|
||||
{
|
||||
MDS_TG(500_ms);
|
||||
MDS_TG(10_ms);
|
||||
int ret = OB_SUCCESS;
|
||||
int tmp_ret = OB_SUCCESS;
|
||||
ObLSHandle src_ls_handle;
|
||||
@ -967,7 +967,7 @@ int ObTabletStartTransferInHelper::check_transfer_src_tablet_(
|
||||
const ObMigrationTabletParam &tablet_meta,
|
||||
ObLS *src_ls)
|
||||
{
|
||||
MDS_TG(500_ms);
|
||||
MDS_TG(10_ms);
|
||||
int ret = OB_SUCCESS;
|
||||
int tmp_ret = OB_SUCCESS;
|
||||
ObTabletHandle tablet_handle;
|
||||
@ -1025,7 +1025,7 @@ int ObTabletStartTransferInHelper::create_transfer_in_tablets_(
|
||||
const ObTXStartTransferInInfo &tx_start_transfer_in_info,
|
||||
mds::BufferCtx &ctx)
|
||||
{
|
||||
MDS_TG(500_ms);
|
||||
MDS_TG(10_ms);
|
||||
int ret = OB_SUCCESS;
|
||||
int tmp_ret = OB_SUCCESS;
|
||||
ObLSHandle dest_ls_handle;
|
||||
|
@ -398,7 +398,9 @@ int ObTabletGCHandler::check_tablet_need_gc_(
|
||||
need_gc = true;
|
||||
}
|
||||
} else {
|
||||
// for create tablet abort
|
||||
// for create tablet abort
|
||||
const share::ObLSID &ls_id = tablet->get_tablet_meta().ls_id_;
|
||||
const common::ObTabletID &tablet_id = tablet->get_tablet_meta().tablet_id_;
|
||||
ObTabletCreateDeleteMdsUserData data;
|
||||
bool mds_table_not_null = false;
|
||||
bool is_finish = false;
|
||||
@ -409,9 +411,9 @@ int ObTabletGCHandler::check_tablet_need_gc_(
|
||||
ret = OB_SUCCESS;
|
||||
if (mds_table_not_null) {
|
||||
need_gc = true;
|
||||
STORAGE_LOG(INFO, "create tablet abort, need gc", KPC(tablet));
|
||||
STORAGE_LOG(INFO, "create tablet abort, need gc", K(ret), K(ls_id), K(tablet_id), KP(tablet));
|
||||
} else {
|
||||
STORAGE_LOG(INFO, "tablet_status is not commit", KR(ret), KPC(tablet));
|
||||
STORAGE_LOG(INFO, "tablet_status is not commit", K(ret), K(ls_id), K(tablet_id), KP(tablet));
|
||||
}
|
||||
} else {
|
||||
STORAGE_LOG(WARN, "failed to get CreateDeleteMdsUserData", KR(ret), KPC(tablet));
|
||||
@ -649,24 +651,26 @@ int ObTabletGCHandler::get_max_tablet_transfer_scn(
|
||||
ret = OB_NOT_INIT;
|
||||
STORAGE_LOG(WARN, "tablet gc handler is not inited", KR(ret));
|
||||
} else {
|
||||
ObTenantMetaMemMgr *t3m = MTL(ObTenantMetaMemMgr*);
|
||||
common::ObTabletID tablet_id;
|
||||
ObTabletMapKey key;
|
||||
key.ls_id_ = ls_->get_ls_id();
|
||||
ObTabletCreateDeleteMdsUserData mds_data;
|
||||
ObTabletHandle tablet_handle;
|
||||
const WashTabletPriority priority = WashTabletPriority::WTP_LOW;
|
||||
ObTablet *tablet = nullptr;
|
||||
for (int i = 0; OB_SUCC(ret) && i < deleted_tablets.count(); i++) {
|
||||
mds_data.reset();
|
||||
const ObTabletHandle &tablet_handle = deleted_tablets.at(i);
|
||||
if (OB_FAIL(tablet_handle.get_obj()->ObITabletMdsInterface::get_tablet_status(
|
||||
share::SCN::max_scn(), mds_data, ObTabletCommon::DEFAULT_GET_TABLET_DURATION_US))) {
|
||||
tablet = deleted_tablets.at(i).get_obj();
|
||||
if (OB_ISNULL(tablet)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("tablet is null", K(ret), K(i), "tablet_handle", deleted_tablets.at(i));
|
||||
} else if (OB_FAIL(tablet->ObITabletMdsInterface::get_tablet_status(share::SCN::max_scn(),
|
||||
mds_data, ObTabletCommon::DEFAULT_GET_TABLET_DURATION_US))) {
|
||||
if (OB_EMPTY_RESULT == ret) {
|
||||
ret = OB_SUCCESS;
|
||||
LOG_INFO("create tablet abort, need gc", K(tablet_id));
|
||||
LOG_INFO("create tablet abort, need gc", K(ret),
|
||||
"ls_id", tablet->get_tablet_meta().ls_id_,
|
||||
"tablet_id", tablet->get_tablet_meta().tablet_id_);
|
||||
continue;
|
||||
} else {
|
||||
LOG_WARN("failed to get mds table", KR(ret), K(tablet_handle));
|
||||
LOG_WARN("failed to get mds table", KR(ret),
|
||||
"ls_id", tablet->get_tablet_meta().ls_id_,
|
||||
"tablet_id", tablet->get_tablet_meta().tablet_id_);
|
||||
}
|
||||
} else if (share::SCN::invalid_scn() == mds_data.transfer_scn_) {
|
||||
// do nothing
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "storage/tablet/ob_tablet_multi_source_data.h"
|
||||
#include "storage/high_availability/ob_tablet_ha_status.h"
|
||||
#include "storage/tablet/ob_tablet_binding_helper.h"
|
||||
#include "storage/tablet/ob_tablet_binding_info.h"
|
||||
#include "storage/tablet/ob_tablet_table_store_flag.h"
|
||||
|
||||
namespace oceanbase
|
||||
|
Reference in New Issue
Block a user