[scn] add params to control error printing in SCN::get_val_for_tx()
This commit is contained in:
@ -363,11 +363,15 @@ int SCN::convert_for_tx(int64_t val)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int64_t SCN::get_val_for_tx() const
|
||||
int64_t SCN::get_val_for_tx(const bool ignore_invalid_scn) const
|
||||
{
|
||||
int64_t result_val = 0;
|
||||
int64_t result_val = -1;
|
||||
if (!is_valid()) {
|
||||
PALF_LOG(ERROR, "invalid SCN", K(val_));
|
||||
if (!ignore_invalid_scn) {
|
||||
PALF_LOG(ERROR, "invalid SCN", K(val_));
|
||||
} else {
|
||||
PALF_LOG(WARN, "invalid SCN", K(val_));
|
||||
}
|
||||
} else if (OB_MAX_SCN_TS_NS == ts_ns_) {
|
||||
result_val = INT64_MAX;
|
||||
} else {
|
||||
|
||||
@ -96,7 +96,7 @@ public:
|
||||
uint64_t get_val_for_sql() const;
|
||||
|
||||
//only for tx, include transform from SCN_MAX to INT64_MAX
|
||||
int64_t get_val_for_tx() const;
|
||||
int64_t get_val_for_tx(const bool ignore_invalid_scn = false) const;
|
||||
|
||||
// compare function
|
||||
bool operator==(const SCN &scn) const;
|
||||
|
||||
@ -204,10 +204,10 @@ void ObKeepAliveLSHandler::print_stat_info()
|
||||
"Near_To_GTS_Cnt", stat_info_.near_to_gts_cnt,
|
||||
"Other_Error_Cnt", stat_info_.other_error_cnt,
|
||||
"Submit_Succ_Cnt", stat_info_.submit_succ_cnt,
|
||||
"last_scn", stat_info_.stat_keepalive_info_.scn_.get_val_for_tx(),
|
||||
"last_scn", to_cstring(stat_info_.stat_keepalive_info_.scn_),
|
||||
"last_lsn", stat_info_.stat_keepalive_info_.lsn_,
|
||||
"last_gts", last_gts_,
|
||||
"min_start_scn", stat_info_.stat_keepalive_info_.min_start_scn_.get_val_for_tx(),
|
||||
"min_start_scn", to_cstring(stat_info_.stat_keepalive_info_.min_start_scn_),
|
||||
"min_start_status", stat_info_.stat_keepalive_info_.min_start_status_);
|
||||
stat_info_.clear_cnt();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user