[MDS] mds_written() corrected to tablet_status_written()
This commit is contained in:
parent
081d5b2dd1
commit
d63cad4745
@ -326,14 +326,14 @@ int ObTabletPointer::try_gc_mds_table()
|
||||
return mds_table_handler_.try_gc_mds_table();
|
||||
}
|
||||
|
||||
void ObTabletPointer::set_mds_written()
|
||||
void ObTabletPointer::set_tablet_status_written()
|
||||
{
|
||||
mds_table_handler_.set_mds_written();
|
||||
mds_table_handler_.set_tablet_status_written();
|
||||
}
|
||||
|
||||
bool ObTabletPointer::is_mds_written() const
|
||||
bool ObTabletPointer::is_tablet_status_written() const
|
||||
{
|
||||
return mds_table_handler_.is_mds_written();
|
||||
return mds_table_handler_.is_tablet_status_written();
|
||||
}
|
||||
|
||||
void ObTabletPointer::mark_mds_table_deleted()
|
||||
|
@ -65,8 +65,8 @@ public:
|
||||
int get_mds_table(mds::MdsTableHandle &handle, bool not_exist_create = false);
|
||||
// interfaces forward to mds_table_handler_
|
||||
void mark_mds_table_deleted();
|
||||
void set_mds_written();
|
||||
bool is_mds_written() const;
|
||||
void set_tablet_status_written();
|
||||
bool is_tablet_status_written() const;
|
||||
int try_release_mds_nodes_below(const share::SCN &scn);
|
||||
int try_gc_mds_table();
|
||||
int get_min_mds_ckpt_scn(share::SCN &scn);
|
||||
|
@ -29,9 +29,9 @@ public:
|
||||
int try_gc_mds_table();
|
||||
int try_release_nodes_below(const share::SCN &scn);
|
||||
void reset() { this->~ObMdsTableHandler(); }
|
||||
void set_mds_written() { ATOMIC_CAS(&(is_written_), false, true); }
|
||||
void set_tablet_status_written() { ATOMIC_CAS(&(is_written_), false, true); }
|
||||
void mark_removed_from_t3m(ObTabletPointer *pointer);
|
||||
bool is_mds_written() const { return ATOMIC_LOAD(&(is_written_)); }
|
||||
bool is_tablet_status_written() const { return ATOMIC_LOAD(&(is_written_)); }
|
||||
TO_STRING_KV(K_(mds_table_handle));
|
||||
private:
|
||||
MdsTableMgrHandle mds_table_mgr_handle_;// mgr handle destroy after table handle destroy
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
template <typename T>
|
||||
int is_locked_by_others(bool &is_locked, const mds::MdsWriter &self = mds::MdsWriter()) const;
|
||||
|
||||
int check_mds_written(bool &written);
|
||||
int check_tablet_status_written(bool &written);
|
||||
// specialization get for each module
|
||||
int get_latest_tablet_status(ObTabletCreateDeleteMdsUserData &data, bool &is_committed) const;
|
||||
int get_tablet_status(const share::SCN &snapshot,
|
||||
|
@ -118,7 +118,7 @@ inline int ObITabletMdsInterface::get_autoinc_seq(ObIAllocator &allocator,
|
||||
#undef PRINT_WRAPPER
|
||||
}
|
||||
|
||||
inline int ObITabletMdsInterface::check_mds_written(bool &written)
|
||||
inline int ObITabletMdsInterface::check_tablet_status_written(bool &written)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
written = false;
|
||||
@ -129,7 +129,7 @@ inline int ObITabletMdsInterface::check_mds_written(bool &written)
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
MDS_LOG(ERROR, "tablet pointer is null", K(ret), KPC(this));
|
||||
} else {
|
||||
written = get_tablet_ponter_()->is_mds_written();
|
||||
written = get_tablet_ponter_()->is_tablet_status_written();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -292,9 +292,8 @@ int ObITabletMdsInterface::set(T &&data, mds::MdsCtx &ctx, const int64_t lock_ti
|
||||
MDS_LOG_SET(WARN, "tablet pointer is null", K(ret), KPC(this));
|
||||
} else if (MDS_FAIL(handle.set(std::forward<T>(data), ctx, lock_timeout_us))) {
|
||||
MDS_LOG_SET(WARN, "failed to set dummy key unit data");
|
||||
} else {
|
||||
get_tablet_ponter_()->set_mds_written();
|
||||
MDS_LOG_SET(TRACE, "success to set dummy key unit data");
|
||||
} else if (std::is_same<ObTabletCreateDeleteMdsUserData, typename std::decay<T>::type>::value) {
|
||||
get_tablet_ponter_()->set_tablet_status_written();
|
||||
}
|
||||
return ret;
|
||||
#undef PRINT_WRAPPER
|
||||
@ -320,9 +319,8 @@ int ObITabletMdsInterface::replay(T &&data, mds::MdsCtx &ctx, const share::SCN &
|
||||
MDS_LOG_SET(WARN, "tablet pointer is null", K(ret), KPC(this));
|
||||
} else if (CLICK_FAIL(handle.replay(std::forward<T>(data), ctx, scn))) {
|
||||
MDS_LOG_SET(WARN, "failed to replay dummy key unit data");
|
||||
} else {
|
||||
get_tablet_ponter_()->set_mds_written();
|
||||
MDS_LOG_SET(TRACE, "success to replay dummy key unit data");
|
||||
} else if (std::is_same<ObTabletCreateDeleteMdsUserData, typename std::decay<T>::type>::value) {
|
||||
get_tablet_ponter_()->set_tablet_status_written();
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
@ -347,7 +345,7 @@ int ObITabletMdsInterface::set(const Key &key, Value &&data, mds::MdsCtx &ctx, c
|
||||
} else if (CLICK_FAIL(handle.set(key, std::forward<Value>(data), ctx, lock_timeout_us))) {
|
||||
MDS_LOG_SET(WARN, "failed to set multi key unit data");
|
||||
} else {
|
||||
get_tablet_ponter_()->set_mds_written();
|
||||
get_tablet_ponter_()->set_tablet_status_written();
|
||||
MDS_LOG_SET(TRACE, "success to set multi key unit data");
|
||||
}
|
||||
return ret;
|
||||
@ -378,7 +376,7 @@ int ObITabletMdsInterface::replay(const Key &key,
|
||||
} else if (CLICK_FAIL(handle.replay(key, std::forward<Value>(mds), ctx, scn))) {
|
||||
MDS_LOG_SET(WARN, "failed to replay multi key unit data");
|
||||
} else {
|
||||
get_tablet_ponter_()->set_mds_written();
|
||||
get_tablet_ponter_()->set_tablet_status_written();
|
||||
MDS_LOG_SET(TRACE, "success to replay multi key unit data");
|
||||
}
|
||||
}
|
||||
@ -408,7 +406,7 @@ int ObITabletMdsInterface::remove(const Key &key, mds::MdsCtx &ctx, const int64_
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
MDS_LOG_SET(WARN, "tablet pointer is null", K(ret), KPC(this));
|
||||
} else {
|
||||
get_tablet_ponter_()->set_mds_written();
|
||||
get_tablet_ponter_()->set_tablet_status_written();
|
||||
MDS_LOG_SET(TRACE, "success to remove multi key unit data");
|
||||
}
|
||||
return ret;
|
||||
@ -434,7 +432,7 @@ int ObITabletMdsInterface::replay_remove(const Key &key, mds::MdsCtx &ctx, const
|
||||
} else if (CLICK() && OB_SUCCESS != (ret = handle.replay_remove<Key, Value>(key, ctx, scn))) {
|
||||
MDS_LOG_SET(WARN, "failed to replay remove multi key unit data");
|
||||
} else {
|
||||
get_tablet_ponter_()->set_mds_written();
|
||||
get_tablet_ponter_()->set_tablet_status_written();
|
||||
MDS_LOG_SET(TRACE, "success to remove multi key unit data");
|
||||
}
|
||||
return ret;
|
||||
|
@ -402,7 +402,7 @@ int ObTabletGCHandler::check_tablet_need_gc_(
|
||||
ObTabletCreateDeleteMdsUserData data;
|
||||
bool mds_table_not_null = false;
|
||||
bool is_finish = false;
|
||||
if (OB_FAIL(tablet->check_mds_written(mds_table_not_null))) {
|
||||
if (OB_FAIL(tablet->check_tablet_status_written(mds_table_not_null))) {
|
||||
STORAGE_LOG(WARN, "failed to check mds written", KR(ret), KPC(tablet));
|
||||
} else if (OB_FAIL(tablet->ObITabletMdsInterface::get_latest_tablet_status(data, is_finish))) {
|
||||
if (OB_EMPTY_RESULT == ret) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user