check row mvcc flag

This commit is contained in:
z404289981
2023-12-06 03:46:42 +00:00
committed by ob-robot
parent 6a8e140c01
commit f88042bfd9
4 changed files with 104 additions and 14 deletions

View File

@ -276,6 +276,10 @@ public:
{
is_shadow_ = is_shadow_row;
}
inline bool is_valid() const
{
return !is_first_multi_version_row() || is_uncommitted_row() || is_last_multi_version_row() || is_ghost_row() || is_shadow_row();
}
inline bool is_compacted_multi_version_row() const { return is_compacted_; }
inline bool is_last_multi_version_row() const { return is_last_; }
inline bool is_first_multi_version_row() const { return is_first_; }

View File

@ -840,9 +840,12 @@ int ObMacroBlockWriter::check_order(const ObDatumRow &row)
int64_t cur_row_version = 0;
int64_t cur_sql_sequence = 0;
if (!row.is_valid() || row.get_column_count() != data_store_desc_->get_row_column_count()) {
ret = OB_INVALID_ARGUMENT;
ret = OB_ERR_UNEXPECTED;
STORAGE_LOG(ERROR, "invalid macro block writer input argument.",
K(row), "row_column_count", data_store_desc_->get_row_column_count(), K(ret));
} else if (OB_UNLIKELY(!row.mvcc_row_flag_.is_valid())) {
ret = OB_ERR_UNEXPECTED;
STORAGE_LOG(ERROR, "invalid mvcc_row_flag", K(ret), K(row.mvcc_row_flag_));
} else {
ObMacroBlock &curr_block = macro_blocks_[current_index_];
cur_row_version = row.storage_datums_[trans_version_col_idx].get_int();