提交 94816acd 编写于 作者: O obdev 提交者: wangzelin.wzl

patch code from 3_1_x_release

上级 ef2b6227
...@@ -806,6 +806,7 @@ int ObMacroBlockWriter::check_order(const ObStoreRow& row) ...@@ -806,6 +806,7 @@ int ObMacroBlockWriter::check_order(const ObStoreRow& row)
} }
} else if (!row.row_type_flag_.is_uncommitted_row()) { // update max commit version } else if (!row.row_type_flag_.is_uncommitted_row()) { // update max commit version
micro_writer_->update_max_merged_trans_version(-cur_row_version); micro_writer_->update_max_merged_trans_version(-cur_row_version);
row.row_val_.cells_[sql_sequence_col_idx].set_int(0); // make sql sequence = 0
} else { // not committed } else { // not committed
micro_writer_->set_contain_uncommitted_row(); micro_writer_->set_contain_uncommitted_row();
LOG_TRACE("meet uncommited trans row", K(row)); LOG_TRACE("meet uncommited trans row", K(row));
......
...@@ -70,6 +70,7 @@ public: ...@@ -70,6 +70,7 @@ public:
{ {
return task_index_writer_->get_macro_block_write_ctx(); return task_index_writer_->get_macro_block_write_ctx();
} }
int dump_micro_block_writer_buffer();
TO_STRING_KV(K_(block_write_ctx)); TO_STRING_KV(K_(block_write_ctx));
struct IndexMicroBlockBuilder { struct IndexMicroBlockBuilder {
...@@ -159,7 +160,6 @@ private: ...@@ -159,7 +160,6 @@ private:
int prepare_micro_block_reader(const char* buf, const int64_t size, ObIMicroBlockReader*& micro_reader); int prepare_micro_block_reader(const char* buf, const int64_t size, ObIMicroBlockReader*& micro_reader);
int print_micro_block_row(ObIMicroBlockReader* micro_reader); int print_micro_block_row(ObIMicroBlockReader* micro_reader);
int dump_micro_block_writer_buffer();
private: private:
static const int64_t DEFAULT_MACRO_BLOCK_COUNT = 128; static const int64_t DEFAULT_MACRO_BLOCK_COUNT = 128;
......
...@@ -1363,7 +1363,7 @@ int ObMinorPartitionMergeFuser::set_multi_version_row_flag( ...@@ -1363,7 +1363,7 @@ int ObMinorPartitionMergeFuser::set_multi_version_row_flag(
const MERGE_ITER_ARRAY& macro_row_iters, ObStoreRow& store_row) const MERGE_ITER_ARRAY& macro_row_iters, ObStoreRow& store_row)
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
store_row.row_type_flag_.set_compacted_multi_version_row(false); store_row.row_type_flag_.set_compacted_multi_version_row(true);
store_row.row_type_flag_.set_first_multi_version_row(true); store_row.row_type_flag_.set_first_multi_version_row(true);
if (need_check_curr_row_last_) { if (need_check_curr_row_last_) {
store_row.row_type_flag_.set_last_multi_version_row(true); store_row.row_type_flag_.set_last_multi_version_row(true);
...@@ -1372,9 +1372,8 @@ int ObMinorPartitionMergeFuser::set_multi_version_row_flag( ...@@ -1372,9 +1372,8 @@ int ObMinorPartitionMergeFuser::set_multi_version_row_flag(
} }
for (int64_t i = 0; i < macro_row_iters.count(); ++i) { for (int64_t i = 0; i < macro_row_iters.count(); ++i) {
if (macro_row_iters.at(i)->get_curr_row()->row_type_flag_.is_compacted_multi_version_row() || if (!macro_row_iters.at(i)->get_curr_row()->row_type_flag_.is_compacted_multi_version_row()) {
!macro_row_iters.at(i)->get_table()->is_multi_version_table()) { store_row.row_type_flag_.set_compacted_multi_version_row(false);
store_row.row_type_flag_.set_compacted_multi_version_row(true);
break; break;
} }
} }
......
...@@ -45,7 +45,9 @@ ObMacroBlockBuilder::ObMacroBlockBuilder() ...@@ -45,7 +45,9 @@ ObMacroBlockBuilder::ObMacroBlockBuilder()
need_build_bloom_filter_(false), need_build_bloom_filter_(false),
bf_macro_writer_(), bf_macro_writer_(),
cols_id_map_(nullptr), cols_id_map_(nullptr),
is_opened_(false) is_opened_(false),
check_row_flag_status_(CHECK_FIRST_ROW),
last_compact_row_nop_cnt_(-1)
{} {}
ObMacroBlockBuilder::~ObMacroBlockBuilder() ObMacroBlockBuilder::~ObMacroBlockBuilder()
...@@ -352,6 +354,8 @@ int ObMacroBlockBuilder::process(const blocksstable::ObMacroBlockCtx& macro_bloc ...@@ -352,6 +354,8 @@ int ObMacroBlockBuilder::process(const blocksstable::ObMacroBlockCtx& macro_bloc
} else if (OB_FAIL(writer_->append_macro_block(macro_block_ctx))) { } else if (OB_FAIL(writer_->append_macro_block(macro_block_ctx))) {
STORAGE_LOG(WARN, "macro block writer fail to close.", K(ret)); STORAGE_LOG(WARN, "macro block writer fail to close.", K(ret));
} else { } else {
check_row_flag_status_ = CHECK_FIRST_ROW;
last_compact_row_nop_cnt_ = -1;
STORAGE_LOG(DEBUG, "Success to append macro block, ", K(macro_block_ctx)); STORAGE_LOG(DEBUG, "Success to append macro block, ", K(macro_block_ctx));
} }
return ret; return ret;
...@@ -423,12 +427,18 @@ int ObMacroBlockBuilder::check_flat_row_columns(const ObStoreRow& row) ...@@ -423,12 +427,18 @@ int ObMacroBlockBuilder::check_flat_row_columns(const ObStoreRow& row)
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
if (ObActionFlag::OP_ROW_EXIST != row.flag_) { if (ObActionFlag::OP_ROW_EXIST != row.flag_) {
if (row.row_type_flag_.is_last_multi_version_row()) { // meet last row
check_row_flag_status_ = CHECK_FIRST_ROW;
last_compact_row_nop_cnt_ = -1;
}
} else if (row.row_val_.count_ != desc_.row_column_count_) { } else if (row.row_val_.count_ != desc_.row_column_count_) {
ret = OB_ERR_UNEXPECTED; ret = OB_ERR_UNEXPECTED;
LOG_ERROR("Unexpected column count of store row", K(row), K_(desc), K(ret)); LOG_ERROR("Unexpected column count of store row", K(row), K_(desc), K(ret));
} else { } else {
const int64_t interval = 4; const int64_t interval = 4;
int64_t i = 0; int64_t i = 0;
int64_t nop_pos_cnt = 0;
bool check_nop_pos_flag = desc_.is_multi_version_minor_sstable();
for (i = 0; i + interval < row.row_val_.count_; i += interval) { for (i = 0; i + interval < row.row_val_.count_; i += interval) {
const int tmp0 = check_row_column(row, i + 0); const int tmp0 = check_row_column(row, i + 0);
const int tmp1 = check_row_column(row, i + 1); const int tmp1 = check_row_column(row, i + 1);
...@@ -438,14 +448,43 @@ int ObMacroBlockBuilder::check_flat_row_columns(const ObStoreRow& row) ...@@ -438,14 +448,43 @@ int ObMacroBlockBuilder::check_flat_row_columns(const ObStoreRow& row)
ret = OB_ERR_UNEXPECTED; ret = OB_ERR_UNEXPECTED;
LOG_WARN("failed to check row column", K(ret), K(i), K(interval), K(row)); LOG_WARN("failed to check row column", K(ret), K(i), K(interval), K(row));
break; break;
} else if (check_nop_pos_flag) {
nop_pos_cnt += (row.row_val_.cells_[i].is_nop_value()
+ row.row_val_.cells_[i + 1].is_nop_value()
+ row.row_val_.cells_[i + 2].is_nop_value()
+ row.row_val_.cells_[i + 3].is_nop_value());
} }
} }
for (; OB_SUCC(ret) && i < row.row_val_.count_; ++i) { for (; OB_SUCC(ret) && i < row.row_val_.count_; ++i) {
if (OB_FAIL(check_row_column(row, i))) { if (OB_FAIL(check_row_column(row, i))) {
LOG_WARN("failed to check row column", K(ret), K(i)); LOG_WARN("failed to check row column", K(ret), K(i));
} else if (check_nop_pos_flag) {
nop_pos_cnt += row.row_val_.cells_[i].is_nop_value();
} }
} }
if (OB_SUCC(ret) && check_nop_pos_flag) {
if (row.row_type_flag_.is_uncommitted_row()) {
// do nothing
} else if (CHECK_FIRST_ROW == check_row_flag_status_) { // meet first committed row
check_row_flag_status_ = CHECK_LAST_ROW;
} else if (CHECK_LAST_ROW == check_row_flag_status_) {
if (nop_pos_cnt < last_compact_row_nop_cnt_) {
ret = OB_ERR_UNEXPECTED;
LOG_ERROR("nop_cnt of current row is less than last compact row", K(ret), K(nop_pos_cnt),
K(row), K(last_compact_row_nop_cnt_));
}
}
if (row.row_type_flag_.is_last_multi_version_row()) { // meet last row
check_row_flag_status_ = CHECK_FIRST_ROW;
last_compact_row_nop_cnt_ = -1;
} else if (row.row_type_flag_.is_compacted_multi_version_row()
&& ObActionFlag::OP_ROW_DOES_NOT_EXIST != row.flag_
&& ObActionFlag::OP_DEL_ROW != row.flag_) {
last_compact_row_nop_cnt_ = nop_pos_cnt;
}
}
} }
return ret; return ret;
...@@ -550,6 +589,7 @@ int ObMacroBlockBuilder::process(const ObStoreRow& row, const ObCompactRowType:: ...@@ -550,6 +589,7 @@ int ObMacroBlockBuilder::process(const ObStoreRow& row, const ObCompactRowType::
STORAGE_LOG(WARN, "The row is invalid, ", K(row), K(ret)); STORAGE_LOG(WARN, "The row is invalid, ", K(row), K(ret));
} else if (OB_FAIL(check_row_columns(row))) { } else if (OB_FAIL(check_row_columns(row))) {
STORAGE_LOG(WARN, "The row is invalid, ", K(row), K_(desc), K(ret)); STORAGE_LOG(WARN, "The row is invalid, ", K(row), K_(desc), K(ret));
writer_->dump_micro_block_writer_buffer();
} else if (!is_multi_version_minor_merge(merge_type_)) { } else if (!is_multi_version_minor_merge(merge_type_)) {
if ((ObActionFlag::OP_ROW_EXIST == row.flag_ || row.row_type_flag_.is_uncommitted_row()) && if ((ObActionFlag::OP_ROW_EXIST == row.flag_ || row.row_type_flag_.is_uncommitted_row()) &&
OB_FAIL(writer_->append_row(row))) { OB_FAIL(writer_->append_row(row))) {
...@@ -690,6 +730,8 @@ void ObMacroBlockBuilder::reset() ...@@ -690,6 +730,8 @@ void ObMacroBlockBuilder::reset()
need_build_bloom_filter_ = false; need_build_bloom_filter_ = false;
bf_macro_writer_.reset(); bf_macro_writer_.reset();
is_opened_ = false; is_opened_ = false;
check_row_flag_status_ = CHECK_FIRST_ROW;
last_compact_row_nop_cnt_ = -1;
} }
void ObMacroBlockBuilder::set_purged_count(const int64_t count) void ObMacroBlockBuilder::set_purged_count(const int64_t count)
......
...@@ -96,6 +96,11 @@ protected: ...@@ -96,6 +96,11 @@ protected:
OB_INLINE int check_sparse_row_column(const common::ObObj& obj, const int64_t idx); OB_INLINE int check_sparse_row_column(const common::ObObj& obj, const int64_t idx);
int append_bloom_filter(const storage::ObStoreRow& row); int append_bloom_filter(const storage::ObStoreRow& row);
enum CheckRowFlagStatus
{
CHECK_FIRST_ROW = 0,
CHECK_LAST_ROW = 1,
};
private: private:
storage::ObMergeType merge_type_; storage::ObMergeType merge_type_;
blocksstable::ObMacroBlockWriter* writer_; blocksstable::ObMacroBlockWriter* writer_;
...@@ -109,6 +114,8 @@ private: ...@@ -109,6 +114,8 @@ private:
blocksstable::ObBloomFilterDataWriter bf_macro_writer_; blocksstable::ObBloomFilterDataWriter bf_macro_writer_;
share::schema::ColumnMap* cols_id_map_; share::schema::ColumnMap* cols_id_map_;
bool is_opened_; bool is_opened_;
CheckRowFlagStatus check_row_flag_status_;
int64_t last_compact_row_nop_cnt_;
}; };
class ObMacroBlockEstimator : public ObIStoreRowProcessor { class ObMacroBlockEstimator : public ObIStoreRowProcessor {
......
...@@ -1213,8 +1213,9 @@ int ObMinorMergeMacroRowIterator::next() ...@@ -1213,8 +1213,9 @@ int ObMinorMergeMacroRowIterator::next()
// the first output row of each rowkey must be compact row // the first output row of each rowkey must be compact row
// skip the uncommited row and magic row(last row) // skip the uncommited row and magic row(last row)
check_first_row_compacted_ = false; check_first_row_compacted_ = false;
if (curr_row_->row_type_flag_.is_compacted_multi_version_row()) { // do nothing for compacted row if (curr_row_->row_type_flag_.is_compacted_multi_version_row()
// do nothing && 0 == curr_row_->row_val_.cells_[multi_version_row_info_->trans_version_index_ + 1].get_int()) {
// curr row is compact row && is not a uncommitted->committed row
} else if (OB_FAIL(make_first_row_compacted())) { } else if (OB_FAIL(make_first_row_compacted())) {
LOG_WARN("Fail to compact first row, ", K(ret)); LOG_WARN("Fail to compact first row, ", K(ret));
} else if (OB_FAIL(row_queue_.get_next_row(curr_row_))) { // return first row in row_queue } else if (OB_FAIL(row_queue_.get_next_row(curr_row_))) { // return first row in row_queue
......
...@@ -927,13 +927,15 @@ int ObMemtableMultiVersionScanIterator::init(const storage::ObTableIterParam& pa ...@@ -927,13 +927,15 @@ int ObMemtableMultiVersionScanIterator::init(const storage::ObTableIterParam& pa
int ObMemtableMultiVersionScanIterator::init_row_cells(ObIAllocator* allocator) int ObMemtableMultiVersionScanIterator::init_row_cells(ObIAllocator* allocator)
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
void *buf = nullptr;
if (OB_ISNULL(allocator)) { if (OB_ISNULL(allocator)) {
ret = OB_INVALID_ARGUMENT; ret = OB_INVALID_ARGUMENT;
TRANS_LOG(WARN, "allocator is null", K(ret), K(allocator)); TRANS_LOG(WARN, "allocator is null", K(ret), K(allocator));
} else if (NULL == (row_.row_val_.cells_ = (ObObj*)allocator->alloc(sizeof(ObObj) * columns_.count()))) { } else if (NULL == (buf = (ObObj*)allocator->alloc(sizeof(ObObj) * columns_.count()))) {
ret = OB_ALLOCATE_MEMORY_FAILED; ret = OB_ALLOCATE_MEMORY_FAILED;
TRANS_LOG(WARN, "alloc cells fail", K(ret), "size", sizeof(ObObj) * columns_.count()); TRANS_LOG(WARN, "alloc cells fail", K(ret), "size", sizeof(ObObj) * columns_.count());
} else { } else {
row_.row_val_.cells_ = new (buf) ObObj[columns_.count()];
row_.row_val_.count_ = columns_.count(); row_.row_val_.count_ = columns_.count();
} }
return ret; return ret;
......
...@@ -216,6 +216,7 @@ OB_INLINE static int simple_fuse_row( ...@@ -216,6 +216,7 @@ OB_INLINE static int simple_fuse_row(
if (common::ObActionFlag::OP_DEL_ROW == former.flag_) { if (common::ObActionFlag::OP_DEL_ROW == former.flag_) {
final_result = true; final_result = true;
if (first_val) { // copy rowkey if (first_val) { // copy rowkey
result.row_val_.count_ = former.row_val_.count_;
for (int i = 0; OB_SUCC(ret) && i < former.row_val_.count_; ++i) { for (int i = 0; OB_SUCC(ret) && i < former.row_val_.count_; ++i) {
if (OB_FAIL(obj_copy(former.row_val_.cells_[i], result.row_val_.cells_[i]))) { if (OB_FAIL(obj_copy(former.row_val_.cells_[i], result.row_val_.cells_[i]))) {
STORAGE_LOG(WARN, "failed to copy obj", K(ret), K(i), K(former.row_val_.cells_[i])); STORAGE_LOG(WARN, "failed to copy obj", K(ret), K(i), K(former.row_val_.cells_[i]));
......
...@@ -30,24 +30,26 @@ int ObSSTableDumpErrorInfo::get_sstable_scan_iter( ...@@ -30,24 +30,26 @@ int ObSSTableDumpErrorInfo::get_sstable_scan_iter(
range.get_range().set_whole_range(); range.get_range().set_whole_range();
if (OB_FAIL(range.to_collation_free_range_on_demand_and_cutoff_range(allocator_))) { if (OB_FAIL(range.to_collation_free_range_on_demand_and_cutoff_range(allocator_))) {
STORAGE_LOG(WARN, "failed to transform range to collation free and range cutoff", K(range), K(ret)); STORAGE_LOG(WARN, "failed to transform range to collation free and range cutoff", K(range), K(ret));
} else if (OB_FAIL(prepare_sstable_query_param(sstable, schema))) { } else if (OB_FAIL(prepare_sstable_query_param(sstable, schema, query_param_for_table1_))) {
STORAGE_LOG(WARN, "Fail to preapare scan param", K(ret)); STORAGE_LOG(WARN, "Fail to preapare scan param", K(ret));
} else if (OB_FAIL(sstable.scan(param_, context_, range, scanner))) { } else if (OB_FAIL(sstable.scan(query_param_for_table1_.param_, query_param_for_table1_.context_, range, scanner))) {
STORAGE_LOG(WARN, "Fail to scan param", K(ret)); STORAGE_LOG(WARN, "Fail to scan param", K(ret));
} }
return ret; return ret;
} }
int ObSSTableDumpErrorInfo::prepare_sstable_query_param(ObSSTable& sstable, const ObTableSchema& schema) int ObSSTableDumpErrorInfo::prepare_sstable_query_param(
ObSSTable& sstable, const ObTableSchema& schema, QueryParam& query_param)
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
reset(); query_param.reset();
const uint64_t tenant_id = extract_tenant_id(schema.get_table_id()); const uint64_t tenant_id = extract_tenant_id(schema.get_table_id());
if (OB_FAIL(schema.get_column_ids(column_ids_, true))) { if (OB_FAIL(schema.get_column_ids(query_param.column_ids_, true))) {
STORAGE_LOG(WARN, "Fail to get column ids. ", K(ret)); STORAGE_LOG(WARN, "Fail to get column ids. ", K(ret));
} else if (FALSE_IT(param_.out_cols_ = &column_ids_)) { } else if (FALSE_IT(query_param.param_.out_cols_ = &query_param.column_ids_)) {
STORAGE_LOG(ERROR, "row getter", K(ret), K(column_ids_)); STORAGE_LOG(ERROR, "row getter", K(ret), K(query_param.column_ids_));
} else { } else {
STORAGE_LOG(INFO, "success to get column ids. ", K(ret), K(query_param.column_ids_));
ObQueryFlag query_flag(ObQueryFlag::Forward, ObQueryFlag query_flag(ObQueryFlag::Forward,
true, /*is daily merge scan*/ true, /*is daily merge scan*/
true, /*is read multiple macro block*/ true, /*is read multiple macro block*/
...@@ -55,22 +57,22 @@ int ObSSTableDumpErrorInfo::prepare_sstable_query_param(ObSSTable& sstable, cons ...@@ -55,22 +57,22 @@ int ObSSTableDumpErrorInfo::prepare_sstable_query_param(ObSSTable& sstable, cons
false /*is full row scan?*/, false /*is full row scan?*/,
false, false,
false); false);
store_ctx_.cur_pkey_ = sstable.get_partition_key(); query_param.store_ctx_.cur_pkey_ = sstable.get_partition_key();
param_.table_id_ = schema.get_table_id(); query_param.param_.table_id_ = schema.get_table_id();
param_.rowkey_cnt_ = schema.get_rowkey_column_num(); query_param.param_.rowkey_cnt_ = schema.get_rowkey_column_num();
param_.schema_version_ = schema.get_schema_version(); query_param.param_.schema_version_ = schema.get_schema_version();
context_.query_flag_ = query_flag; query_param.context_.query_flag_ = query_flag;
context_.store_ctx_ = &store_ctx_; query_param.context_.store_ctx_ = &query_param.store_ctx_;
context_.allocator_ = &allocator_; query_param.context_.allocator_ = &allocator_;
context_.stmt_allocator_ = &allocator_; query_param.context_.stmt_allocator_ = &allocator_;
context_.trans_version_range_ = sstable.get_key().trans_version_range_; query_param.context_.trans_version_range_ = sstable.get_key().trans_version_range_;
context_.is_inited_ = true; // just used for dump query_param.context_.is_inited_ = true; // just used for dump
} }
return ret; return ret;
} }
int ObSSTableDumpErrorInfo::simple_get_sstable_rowkey_get_iter( int ObSSTableDumpErrorInfo::simple_get_sstable_rowkey_get_iter(
ObSSTable& sstable, const common::ObStoreRowkey& rowkey, ObStoreRowIterator*& getter) ObSSTable& sstable, const common::ObStoreRowkey& rowkey, QueryParam& query_param, ObStoreRowIterator*& getter)
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
getter = NULL; getter = NULL;
...@@ -78,8 +80,8 @@ int ObSSTableDumpErrorInfo::simple_get_sstable_rowkey_get_iter( ...@@ -78,8 +80,8 @@ int ObSSTableDumpErrorInfo::simple_get_sstable_rowkey_get_iter(
ext_rowkey_.get_store_rowkey() = rowkey; ext_rowkey_.get_store_rowkey() = rowkey;
if (OB_FAIL(ext_rowkey_.to_collation_free_on_demand_and_cutoff_range(allocator_))) { if (OB_FAIL(ext_rowkey_.to_collation_free_on_demand_and_cutoff_range(allocator_))) {
STORAGE_LOG(WARN, "Fail to transfer rowkey", K(ret), K(ext_rowkey_)); STORAGE_LOG(WARN, "Fail to transfer rowkey", K(ret), K(ext_rowkey_));
} else if (OB_FAIL(sstable.get(param_, context_, ext_rowkey_, getter))) { } else if (OB_FAIL(sstable.get(query_param.param_, query_param.context_, ext_rowkey_, getter))) {
STORAGE_LOG(WARN, "Fail to get param", K(ret), K(column_ids_)); STORAGE_LOG(WARN, "Fail to get param", K(ret), K(query_param.column_ids_));
} }
return ret; return ret;
} }
...@@ -101,6 +103,7 @@ int ObSSTableDumpErrorInfo::generate_projecter( ...@@ -101,6 +103,7 @@ int ObSSTableDumpErrorInfo::generate_projecter(
STORAGE_LOG(WARN, "failed to add into map", K(ret), K(i), K(column_ids_1.at(i))); STORAGE_LOG(WARN, "failed to add into map", K(ret), K(i), K(column_ids_1.at(i)));
} }
} }
STORAGE_LOG(INFO, "generate_projecter", K(ret), K(column_ids_1), K(column_ids_2));
if (OB_SUCC(ret)) { if (OB_SUCC(ret)) {
if (OB_FAIL(schema2.get_column_ids(column_ids_2))) { if (OB_FAIL(schema2.get_column_ids(column_ids_2))) {
STORAGE_LOG(WARN, "failed to get column ids", K(ret), K(schema1)); STORAGE_LOG(WARN, "failed to get column ids", K(ret), K(schema1));
...@@ -116,7 +119,9 @@ int ObSSTableDumpErrorInfo::generate_projecter( ...@@ -116,7 +119,9 @@ int ObSSTableDumpErrorInfo::generate_projecter(
} }
} }
if (OB_SUCC(ret) && OB_FAIL(projector.push_back(dest_pos))) { if (OB_SUCC(ret) && OB_FAIL(projector.push_back(dest_pos))) {
STORAGE_LOG(WARN, "success to get from hash map", K(ret), K(i), K(column_ids_2.at(i)), K(dest_pos)); STORAGE_LOG(WARN, "failed to push into projector", K(ret), K(i), K(column_ids_2.at(i)), K(dest_pos));
} else {
STORAGE_LOG(INFO, "success to push into projector", K(ret), K(i), K(column_ids_2.at(i)), K(dest_pos));
} }
} // end for } // end for
} }
...@@ -136,8 +141,13 @@ int ObSSTableDumpErrorInfo::transform_rowkey( ...@@ -136,8 +141,13 @@ int ObSSTableDumpErrorInfo::transform_rowkey(
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
for (int i = 0; i < rowkey_cnt; ++i) { for (int i = 0; i < rowkey_cnt; ++i) {
if (projector.at(i) < 0) {
ret = OB_ERR_UNEXPECTED;
STORAGE_LOG(WARN, "projector is invalid", K(ret), K(i), K(rowkey_cnt), K(projector));
} else {
rowkey_obj_[i] = row.row_val_.cells_[projector.at(i)]; rowkey_obj_[i] = row.row_val_.cells_[projector.at(i)];
} }
}
rowkey.assign(rowkey_obj_, rowkey_cnt); rowkey.assign(rowkey_obj_, rowkey_cnt);
return ret; return ret;
} }
...@@ -151,20 +161,20 @@ int ObSSTableDumpErrorInfo::get_row_with_rowkey_and_check(const ObStoreRow* inpu ...@@ -151,20 +161,20 @@ int ObSSTableDumpErrorInfo::get_row_with_rowkey_and_check(const ObStoreRow* inpu
ret = OB_INVALID_ARGUMENT; ret = OB_INVALID_ARGUMENT;
STORAGE_LOG(WARN, "getter is NULL", K(ret), KPC(getter)); STORAGE_LOG(WARN, "getter is NULL", K(ret), KPC(getter));
} else if (OB_FAIL(getter->get_next_row(ret_row))) { // get row from sstable1 } else if (OB_FAIL(getter->get_next_row(ret_row))) { // get row from sstable1
STORAGE_LOG(WARN, "failed to get row", K(ret), KPC(input_row)); STORAGE_LOG(WARN, "failed to get row", K(ret), KPC(input_row), KPC(ret_row));
} else if (OB_ISNULL(ret_row) || !ret_row->is_valid()) { } else if (OB_ISNULL(ret_row) || !ret_row->is_valid()) {
ret = OB_ERR_UNEXPECTED; ret = OB_ERR_UNEXPECTED;
STORAGE_LOG(WARN, "row is invalid", K(ret), KPC(ret_row)); STORAGE_LOG(WARN, "row is invalid", K(ret), KPC(ret_row));
} else if (ObActionFlag::OP_ROW_EXIST != ret_row->flag_) { } else if (ObActionFlag::OP_ROW_EXIST != ret_row->flag_) {
++found_row_cnt; ++found_row_cnt;
STORAGE_LOG(ERROR, "found, row is not exist", KPC(input_row)); STORAGE_LOG(ERROR, "found, row is not exist", KPC(input_row), KPC(ret_row));
} else { // check row cells } else { // check row cells
for (int i = 0; i < projector.count(); ++i) { for (int i = 0; i < projector.count(); ++i) {
if (projector.at(i) < 0 || projector.at(i) > input_row->row_val_.count_) { if (projector.at(i) < 0 || projector.at(i) > input_row->row_val_.count_) {
// not exist // not exist
} else if (ret_row->row_val_.cells_[i] != input_row->row_val_.cells_[projector.at(i)]) { } else if (ret_row->row_val_.cells_[i] != input_row->row_val_.cells_[projector.at(i)]) {
++found_row_cnt; ++found_row_cnt;
STORAGE_LOG(ERROR, "found, column is diffenrent", K(i), KPC(ret_row), KPC(input_row)); STORAGE_LOG(ERROR, "found, column is diffenrent", K(i), KPC(ret_row), K(projector.at(i)), KPC(input_row));
break; break;
} }
} // end of for } // end of for
...@@ -178,26 +188,24 @@ int ObSSTableDumpErrorInfo::find_extra_row( ...@@ -178,26 +188,24 @@ int ObSSTableDumpErrorInfo::find_extra_row(
ObSSTable& sstable1, const ObTableSchema& schema1, ObSSTable& sstable2, const ObTableSchema& schema2) ObSSTable& sstable1, const ObTableSchema& schema1, ObSSTable& sstable2, const ObTableSchema& schema2)
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
if (schema1.get_virtual_column_cnt() > 0 || schema2.get_virtual_column_cnt() > 0) {
STORAGE_LOG(INFO, "schema have virtual column", K(ret));
} else {
ObStoreRowIterator* scanner = NULL; ObStoreRowIterator* scanner = NULL;
ObSEArray<int64_t, COL_ARRAY_LEN> projector; ObSEArray<int64_t, COL_ARRAY_LEN> projector;
common::ObSEArray<share::schema::ObColDesc, COL_ARRAY_LEN> col_descs;
int64_t found_row_cnt = 0; int64_t found_row_cnt = 0;
int64_t iter_row_cnt = 0; int64_t iter_row_cnt = 0;
if (OB_FAIL(get_sstable_scan_iter(sstable1, schema1, scanner)) || OB_ISNULL(scanner)) { if (OB_FAIL(get_sstable_scan_iter(sstable1, schema1, scanner)) || OB_ISNULL(scanner)) {
STORAGE_LOG(WARN, "failed to get sstable scan iter", K(ret), K(sstable1), K(schema1)); STORAGE_LOG(WARN, "failed to get sstable scan iter", K(ret), K(sstable1), K(schema1));
} else if (OB_FAIL(generate_projecter(schema1, schema2, projector))) { } else if (OB_FAIL(generate_projecter(schema1, schema2, projector))) {
STORAGE_LOG(WARN, "failed to generate rowkey projector", K(ret)); STORAGE_LOG(WARN, "failed to generate rowkey projector", K(ret));
} else if (OB_FAIL(schema2.get_column_ids(col_descs))) { } else if (OB_FAIL(prepare_sstable_query_param(sstable2, schema2, query_param_for_table2_))) {
STORAGE_LOG(WARN, "failed to get column id array", K(ret), K(schema2));
} else if (OB_FAIL(prepare_sstable_query_param(sstable2, schema2))) {
STORAGE_LOG(WARN, "Fail to preapare scan param", K(ret)); STORAGE_LOG(WARN, "Fail to preapare scan param", K(ret));
} else { } else {
const ObStoreRow* row_in_table1 = NULL; const ObStoreRow* row_in_table1 = NULL;
ObStoreRowIterator* getter = NULL; ObStoreRowIterator* getter = NULL;
common::ObStoreRowkey rowkey; common::ObStoreRowkey rowkey;
const int64_t rowkey_cnt = schema2.get_rowkey_column_num(); const int64_t rowkey_cnt = schema2.get_rowkey_column_num();
param_.table_id_ = schema2.get_table_id();
param_.rowkey_cnt_ = rowkey_cnt;
while (OB_SUCC(ret)) { while (OB_SUCC(ret)) {
if (OB_FAIL(scanner->get_next_row(row_in_table1))) { // get row from sstable1 if (OB_FAIL(scanner->get_next_row(row_in_table1))) { // get row from sstable1
if (OB_ITER_END != ret) { if (OB_ITER_END != ret) {
...@@ -213,7 +221,8 @@ int ObSSTableDumpErrorInfo::find_extra_row( ...@@ -213,7 +221,8 @@ int ObSSTableDumpErrorInfo::find_extra_row(
} else if (OB_FAIL(transform_rowkey( } else if (OB_FAIL(transform_rowkey(
*row_in_table1, rowkey_cnt, projector, rowkey))) { // project into rowkey of sstable2 *row_in_table1, rowkey_cnt, projector, rowkey))) { // project into rowkey of sstable2
STORAGE_LOG(WARN, "failed to transfor rowkey", K(ret)); STORAGE_LOG(WARN, "failed to transfor rowkey", K(ret));
} else if (OB_FAIL(simple_get_sstable_rowkey_get_iter(sstable2, rowkey, getter))) { // get row in sstable2 } else if (OB_FAIL(simple_get_sstable_rowkey_get_iter(
sstable2, rowkey, query_param_for_table2_, getter))) { // get row in sstable2
STORAGE_LOG(WARN, "failed to get table getter", K(ret), KPC(getter)); STORAGE_LOG(WARN, "failed to get table getter", K(ret), KPC(getter));
} else if (OB_FAIL(get_row_with_rowkey_and_check(row_in_table1, getter, projector, found_row_cnt))) { } else if (OB_FAIL(get_row_with_rowkey_and_check(row_in_table1, getter, projector, found_row_cnt))) {
STORAGE_LOG(WARN, "failed to check row", K(ret)); STORAGE_LOG(WARN, "failed to check row", K(ret));
...@@ -236,6 +245,7 @@ int ObSSTableDumpErrorInfo::find_extra_row( ...@@ -236,6 +245,7 @@ int ObSSTableDumpErrorInfo::find_extra_row(
K(found_row_cnt)); K(found_row_cnt));
} }
} }
}
return ret; return ret;
} }
...@@ -257,9 +267,8 @@ int ObSSTableDumpErrorInfo::main_and_index_row_count_error(ObSSTable& main_table ...@@ -257,9 +267,8 @@ int ObSSTableDumpErrorInfo::main_and_index_row_count_error(ObSSTable& main_table
void ObSSTableDumpErrorInfo::reset() void ObSSTableDumpErrorInfo::reset()
{ {
param_.reset(); query_param_for_table1_.reset();
context_.reset(); query_param_for_table2_.reset();
store_ctx_.reset();
ext_rowkey_.reset(); ext_rowkey_.reset();
} }
......
...@@ -23,12 +23,10 @@ namespace storage { ...@@ -23,12 +23,10 @@ namespace storage {
class ObSSTableDumpErrorInfo { class ObSSTableDumpErrorInfo {
public: public:
ObSSTableDumpErrorInfo() ObSSTableDumpErrorInfo()
: param_(), : allocator_("dump_error_info"),
context_(), ext_rowkey_(),
store_ctx_(), query_param_for_table1_(allocator_),
allocator_("dump_error_info"), query_param_for_table2_(allocator_)
column_ids_(COL_ARRAY_LEN, allocator_),
ext_rowkey_()
{} {}
~ObSSTableDumpErrorInfo() ~ObSSTableDumpErrorInfo()
{ {
...@@ -44,6 +42,22 @@ public: ...@@ -44,6 +42,22 @@ public:
private: private:
static const int64_t COL_ARRAY_LEN = 128; static const int64_t COL_ARRAY_LEN = 128;
struct QueryParam {
QueryParam(ObIAllocator& allocator) : param_(), context_(), store_ctx_(), column_ids_(COL_ARRAY_LEN, allocator)
{}
void reset()
{
param_.reset();
context_.reset();
store_ctx_.reset();
column_ids_.reuse();
}
ObTableIterParam param_;
ObTableAccessContext context_;
ObStoreCtx store_ctx_;
ObArray<ObColDesc, ObIAllocator&> column_ids_;
};
private: private:
int find_extra_row( int find_extra_row(
ObSSTable& sstable1, const ObTableSchema& schema1, ObSSTable& sstable2, const ObTableSchema& schema2); ObSSTable& sstable1, const ObTableSchema& schema1, ObSSTable& sstable2, const ObTableSchema& schema2);
...@@ -51,20 +65,18 @@ private: ...@@ -51,20 +65,18 @@ private:
const ObStoreRow& row, const int64_t rowkey_cnt, ObIArray<int64_t>& projector, ObStoreRowkey& rowkey); const ObStoreRow& row, const int64_t rowkey_cnt, ObIArray<int64_t>& projector, ObStoreRowkey& rowkey);
int get_sstable_scan_iter(ObSSTable& sstable, const ObTableSchema& schema, ObStoreRowIterator*& scanner); int get_sstable_scan_iter(ObSSTable& sstable, const ObTableSchema& schema, ObStoreRowIterator*& scanner);
int simple_get_sstable_rowkey_get_iter( int simple_get_sstable_rowkey_get_iter(
ObSSTable& sstable, const common::ObStoreRowkey& rowkey, ObStoreRowIterator*& getter); ObSSTable& sstable, const common::ObStoreRowkey& rowkey, QueryParam& query_param, ObStoreRowIterator*& getter);
int generate_projecter(const ObTableSchema& schema1, const ObTableSchema& schema2, ObIArray<int64_t>& projector); int generate_projecter(const ObTableSchema& schema1, const ObTableSchema& schema2, ObIArray<int64_t>& projector);
int get_row_with_rowkey_and_check(const ObStoreRow* input_row, ObStoreRowIterator* getter, int get_row_with_rowkey_and_check(const ObStoreRow* input_row, ObStoreRowIterator* getter,
common::ObSEArray<int64_t, COL_ARRAY_LEN>& projector, int64_t& found_row_cnt); common::ObSEArray<int64_t, COL_ARRAY_LEN>& projector, int64_t& found_row_cnt);
int prepare_sstable_query_param(ObSSTable& sstable, const ObTableSchema& schema); int prepare_sstable_query_param(ObSSTable& sstable, const ObTableSchema& schema, QueryParam& query_param);
private: private:
ObObj rowkey_obj_[OB_MAX_ROWKEY_COLUMN_NUMBER]; ObObj rowkey_obj_[OB_MAX_ROWKEY_COLUMN_NUMBER];
ObTableIterParam param_;
ObTableAccessContext context_;
ObStoreCtx store_ctx_;
ObArenaAllocator allocator_; ObArenaAllocator allocator_;
ObArray<ObColDesc, ObIAllocator&> column_ids_;
ObExtStoreRowkey ext_rowkey_; ObExtStoreRowkey ext_rowkey_;
QueryParam query_param_for_table1_;
QueryParam query_param_for_table2_;
}; };
} // namespace storage } // namespace storage
......
...@@ -564,9 +564,9 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_rowkey_across_macro_blo ...@@ -564,9 +564,9 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_rowkey_across_macro_blo
const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n" const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n"
"0 var1 -10 0 3 NOP EXIST CF\n" "0 var1 -10 0 3 NOP EXIST CF\n"
"0 var1 -9 -8 2 NOP EXIST CL\n" "0 var1 -9 0 2 NOP EXIST CL\n"
"1 var1 -7 -14 9 6 EXIST CL\n" "1 var1 -7 0 9 6 EXIST CL\n"
"2 var2 -8 -22 5 6 EXIST CL\n"; "2 var2 -8 0 5 6 EXIST CL\n";
// minor mrege // minor mrege
ObMacroBlockBuilder builder; ObMacroBlockBuilder builder;
...@@ -647,11 +647,11 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_rowkey_across_macro_blo ...@@ -647,11 +647,11 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_rowkey_across_macro_blo
const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n" const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n"
"0 var1 -10 0 3 NOP EXIST CF\n" "0 var1 -10 0 3 NOP EXIST CF\n"
"0 var1 -9 -8 2 NOP EXIST CL\n" "0 var1 -9 0 2 NOP EXIST CL\n"
"1 var1 -7 -24 NOP 19 EXIST C\n" "1 var1 -7 0 NOP 19 EXIST C\n"
"1 var1 -6 -7 NOP 2 EXIST C\n" "1 var1 -6 0 NOP 2 EXIST C\n"
"1 var1 -5 -5 NOP 9 EXIST CL\n" "1 var1 -5 0 NOP 9 EXIST CL\n"
"2 var2 -8 -22 3 6 EXIST CL\n"; "2 var2 -8 0 3 6 EXIST CL\n";
// minor mrege // minor mrege
ObMacroBlockBuilder builder; ObMacroBlockBuilder builder;
...@@ -716,7 +716,7 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_rowkey_across_macro_blo ...@@ -716,7 +716,7 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_rowkey_across_macro_blo
macro_data2[1] = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n" macro_data2[1] = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n"
"0 var0 -6 -16 3 NOP EXIST CL\n" "0 var0 -6 -16 3 NOP EXIST CL\n"
"1 var1 -12 -24 NOP 19 EXIST CF\n" "1 var1 -12 -24 3 19 EXIST CF\n"
"1 var1 -8 -22 3 6 EXIST N\n"; "1 var1 -8 -22 3 6 EXIST N\n";
macro_data2[2] = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n" macro_data2[2] = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n"
...@@ -744,15 +744,15 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_rowkey_across_macro_blo ...@@ -744,15 +744,15 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_rowkey_across_macro_blo
const char* result1 = const char* result1 =
"bigint var bigint bigint bigint bigint flag multi_version_row_flag\n" "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n"
"0 var0 -10 0 3 7 EXIST CF\n" // two compact row need to compact together "0 var0 -10 0 3 7 EXIST CF\n" // two compact row need to compact together
"0 var0 -9 -24 NOP 19 EXIST N\n" "0 var0 -9 0 NOP 19 EXIST N\n"
"0 var0 -8 -22 3 6 EXIST N\n" "0 var0 -8 0 3 6 EXIST N\n"
"0 var0 -6 -16 3 7 EXIST CL\n" "0 var0 -6 0 3 7 EXIST CL\n"
"1 var1 -12 -24 NOP 19 EXIST CF\n" "1 var1 -12 0 3 19 EXIST CF\n"
"1 var1 -8 -22 3 6 EXIST N\n" "1 var1 -8 0 3 6 EXIST C\n"
"1 var1 -7 -15 3 6 EXIST C\n" "1 var1 -7 0 3 6 EXIST C\n"
"1 var1 -6 -7 NOP 2 EXIST C\n" "1 var1 -6 0 NOP 2 EXIST C\n"
"1 var1 -5 -5 NOP 9 EXIST CL\n" "1 var1 -5 0 NOP 9 EXIST CL\n"
"2 var2 -8 -22 5 6 EXIST CL\n"; "2 var2 -8 0 5 6 EXIST CL\n";
// minor mrege // minor mrege
...@@ -839,12 +839,12 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_multi_sstable) ...@@ -839,12 +839,12 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_multi_sstable)
ObExtStoreRange range; ObExtStoreRange range;
const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n" const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n"
"0 var0 -1 -9 7 NOP EXIST CLF\n" "0 var0 -1 0 7 NOP EXIST CLF\n"
"1 var1 -12 0 5 19 EXIST CF\n" "1 var1 -12 0 5 19 EXIST CF\n"
"1 var1 -7 -24 5 21 EXIST C\n" "1 var1 -7 0 5 21 EXIST C\n"
"1 var1 -4 0 5 2 EXIST CL\n" "1 var1 -4 0 5 2 EXIST CL\n"
"2 var2 -9 -22 18 7 EXIST CF\n" "2 var2 -9 0 18 7 EXIST CF\n"
"2 var2 -4 -15 NOP 7 EXIST CL\n"; "2 var2 -4 0 NOP 7 EXIST CL\n";
// minor mrege // minor mrege
...@@ -913,7 +913,7 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_multi_sstable2) ...@@ -913,7 +913,7 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_multi_sstable2)
ObSSTable sstable3; ObSSTable sstable3;
const char* macro_data3[1]; const char* macro_data3[1];
macro_data3[0] = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n" macro_data3[0] = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n"
"1 var1 -12 0 NOP 19 EXIST CF\n" "1 var1 -12 0 1 19 EXIST CF\n"
"1 var1 -8 -2 1 6 EXIST N\n" "1 var1 -8 -2 1 6 EXIST N\n"
"1 var1 -7 -35 7 NOP EXIST L\n" "1 var1 -7 -35 7 NOP EXIST L\n"
"2 var2 -9 -25 18 NOP EXIST CLF\n"; "2 var2 -9 -25 18 NOP EXIST CLF\n";
...@@ -935,13 +935,13 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_multi_sstable2) ...@@ -935,13 +935,13 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_multi_sstable2)
ObExtStoreRange range; ObExtStoreRange range;
const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n" const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n"
"0 var0 -9 -11 9 12 EXIST CL\n" "0 var0 -9 0 9 12 EXIST CL\n"
"1 var1 -12 0 NOP 19 EXIST CF\n" "1 var1 -12 0 1 19 EXIST CF\n"
"1 var1 -8 -2 1 6 EXIST N\n" "1 var1 -8 0 1 6 EXIST N\n"
"1 var1 -7 -35 7 19 EXIST C\n" "1 var1 -7 0 7 19 EXIST N\n"
"1 var1 -4 0 NOP 9 EXIST CL\n" "1 var1 -4 0 NOP 9 EXIST CL\n"
"2 var2 -9 -25 18 7 EXIST CF\n" "2 var2 -9 0 18 7 EXIST CF\n"
"2 var2 -4 -15 NOP 7 EXIST L\n"; "2 var2 -4 0 NOP 7 EXIST CL\n";
// minor mrege // minor mrege
...@@ -1044,13 +1044,13 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_multi_sstable3) ...@@ -1044,13 +1044,13 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_multi_sstable3)
const char* result1 = const char* result1 =
"bigint var bigint bigint bigint bigint flag multi_version_row_flag\n" "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n"
"0 var0 -9 -11 9 12 EXIST CL\n" "0 var0 -9 0 9 12 EXIST CL\n"
"1 var1 -12 0 18 19 EXIST CF\n" // two compact rows with same rowkey & diff "1 var1 -12 0 18 19 EXIST CF\n" // two compact rows with same rowkey & diff
// trans_version need compact // trans_version need compact
"1 var1 -8 -2 1 6 EXIST N\n" "1 var1 -8 0 1 6 EXIST N\n"
"1 var1 -7 -35 18 7 EXIST CL\n" "1 var1 -7 0 18 7 EXIST CL\n"
"2 var2 -9 -25 18 9 EXIST CF\n" "2 var2 -9 0 18 9 EXIST CF\n"
"2 var2 -4 -15 NOP 7 EXIST L\n"; "2 var2 -4 0 NOP 7 EXIST CL\n";
// minor mrege // minor mrege
...@@ -1137,9 +1137,9 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_multi_sstable_has_same_row) ...@@ -1137,9 +1137,9 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_multi_sstable_has_same_row)
ObExtStoreRange range; ObExtStoreRange range;
const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n" const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n"
"0 var0 -9 -9 7 12 EXIST CL\n" "0 var0 -9 0 7 12 EXIST CL\n"
"1 var1 -7 -24 18 6 EXIST CL\n" "1 var1 -7 0 18 6 EXIST CL\n"
"2 var2 -9 -5 1 9 EXIST CL\n"; "2 var2 -9 0 1 9 EXIST CL\n";
// minor mrege // minor mrege
...@@ -1229,11 +1229,11 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_new_sstable_had_old_rows) ...@@ -1229,11 +1229,11 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_new_sstable_had_old_rows)
ObExtStoreRange range; ObExtStoreRange range;
const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n" const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n"
"0 var0 -9 -9 7 12 EXIST CL\n" "0 var0 -9 0 7 12 EXIST CL\n"
"1 var1 -12 0 7 6 EXIST CF\n" "1 var1 -12 0 7 6 EXIST CF\n"
"1 var1 -7 -24 18 6 EXIST C\n" "1 var1 -7 0 18 6 EXIST C\n"
"1 var1 -2 0 21 12 EXIST CL\n" "1 var1 -2 0 21 12 EXIST CL\n"
"2 var2 -9 -5 1 9 EXIST CL\n"; "2 var2 -9 0 1 9 EXIST CL\n";
// minor mrege // minor mrege
...@@ -1323,12 +1323,12 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_new_sstable_had_old_rows2) ...@@ -1323,12 +1323,12 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_new_sstable_had_old_rows2)
ObExtStoreRange range; ObExtStoreRange range;
const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n" const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n"
"0 var0 -14 -19 71 12 EXIST C\n" "0 var0 -14 0 71 12 EXIST C\n"
"0 var0 -9 -9 7 12 EXIST CL\n" "0 var0 -9 0 7 12 EXIST CL\n"
"1 var1 -7 -24 21 68 EXIST C\n" "1 var1 -7 0 21 68 EXIST C\n"
"1 var1 -6 0 21 NOP EXIST N\n" "1 var1 -6 0 21 NOP EXIST N\n"
"1 var1 -4 0 91 12 EXIST L\n" "1 var1 -4 0 91 12 EXIST CL\n"
"2 var2 -9 -5 1 9 EXIST CL\n"; "2 var2 -9 0 1 9 EXIST CL\n";
// minor mrege // minor mrege
...@@ -1418,12 +1418,12 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_delete_row) ...@@ -1418,12 +1418,12 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_delete_row)
ObExtStoreRange range; ObExtStoreRange range;
const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n" const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n"
"0 var0 -14 -19 71 12 EXIST C\n" "0 var0 -14 0 71 12 EXIST C\n"
"0 var0 -9 -9 7 12 EXIST CL\n" "0 var0 -9 0 7 12 EXIST CL\n"
"1 var1 -7 -24 NOP NOP DELETE C\n" "1 var1 -7 0 NOP NOP DELETE C\n"
"1 var1 -6 0 21 NOP EXIST N\n" "1 var1 -6 0 21 NOP EXIST N\n"
"1 var1 -4 0 91 12 EXIST L\n" "1 var1 -4 0 91 12 EXIST CL\n"
"2 var2 -9 -5 1 9 EXIST CL\n"; "2 var2 -9 0 1 9 EXIST CL\n";
// minor mrege // minor mrege
...@@ -1513,10 +1513,10 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_test_allocator) ...@@ -1513,10 +1513,10 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_test_allocator)
ObExtStoreRange range; ObExtStoreRange range;
const char* result1 = "bigint var bigint bigint var var flag multi_version_row_flag\n" const char* result1 = "bigint var bigint bigint var var flag multi_version_row_flag\n"
"0 var0 -14 -19 bbbbb huluhulu EXIST C\n" "0 var0 -14 0 bbbbb huluhulu EXIST C\n"
"0 var0 -9 -9 biubiu huluhulu EXIST CL\n" "0 var0 -9 0 biubiu huluhulu EXIST CL\n"
"1 var1 -7 -24 char77 kkkkk3 EXIST CL\n" "1 var1 -7 0 char77 kkkkk3 EXIST CL\n"
"2 var2 -9 -5 1 nnnnn EXIST CL\n"; "2 var2 -9 0 1 nnnnn EXIST CL\n";
// minor mrege // minor mrege
...@@ -1618,10 +1618,10 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_test_allocator2) ...@@ -1618,10 +1618,10 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_test_allocator2)
ObExtStoreRange range; ObExtStoreRange range;
const char* result1 = "bigint var bigint bigint var var flag multi_version_row_flag\n" const char* result1 = "bigint var bigint bigint var var flag multi_version_row_flag\n"
"0 var0 -14 -39 bbbbb akhgfajkhg EXIST C\n" "0 var0 -14 0 bbbbb akhgfajkhg EXIST C\n"
"0 var0 -9 -9 biubiu huluhulu EXIST CL\n" "0 var0 -9 0 biubiu huluhulu EXIST CL\n"
"1 var1 -7 -40 qjkfjkqhgkq hkgqhjkgqhkghqkhgkqh EXIST CL\n" "1 var1 -7 0 qjkfjkqhgkq hkgqhjkgqhkghqkhgkqh EXIST CL\n"
"2 var2 -9 -5 1 nnnnn EXIST CL\n"; "2 var2 -9 0 1 nnnnn EXIST CL\n";
// minor mrege // minor mrege
...@@ -1722,7 +1722,7 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_uncommitted_row_running ...@@ -1722,7 +1722,7 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_uncommitted_row_running
ObExtStoreRange range; ObExtStoreRange range;
const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n" const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n"
"0 var0 -9 -11 9 12 EXIST CL\n" "0 var0 -9 0 9 12 EXIST CL\n"
"1 var1 MIN -35 7 NOP EXIST U\n" "1 var1 MIN -35 7 NOP EXIST U\n"
"1 var1 MIN -26 NOP 11 EXIST U\n" "1 var1 MIN -26 NOP 11 EXIST U\n"
"1 var1 MIN -24 NOP 19 EXIST U\n" "1 var1 MIN -24 NOP 19 EXIST U\n"
...@@ -1731,8 +1731,8 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_uncommitted_row_running ...@@ -1731,8 +1731,8 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_uncommitted_row_running
"1 var1 MIN -7 NOP 2 EXIST U\n" "1 var1 MIN -7 NOP 2 EXIST U\n"
"1 var1 MIN -6 NOP 2 EXIST U\n" "1 var1 MIN -6 NOP 2 EXIST U\n"
"1 var1 -4 0 NOP 9 EXIST CL\n" "1 var1 -4 0 NOP 9 EXIST CL\n"
"2 var2 -9 -25 18 7 EXIST CF\n" "2 var2 -9 0 18 7 EXIST CF\n"
"2 var2 -4 -15 NOP 7 EXIST L\n"; "2 var2 -4 0 NOP 7 EXIST CL\n";
// minor mrege // minor mrege
...@@ -1836,10 +1836,10 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_uncommitted_row_abort) ...@@ -1836,10 +1836,10 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_uncommitted_row_abort)
ObExtStoreRange range; ObExtStoreRange range;
const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n" const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n"
"0 var0 -9 -11 9 12 EXIST CL\n" "0 var0 -9 0 9 12 EXIST CL\n"
"1 var1 -4 0 NOP 9 EXIST CL\n" "1 var1 -4 0 NOP 9 EXIST CL\n"
"2 var2 -9 -25 18 7 EXIST CF\n" "2 var2 -9 0 18 7 EXIST CF\n"
"2 var2 -4 -15 NOP 7 EXIST CL\n"; "2 var2 -4 0 NOP 7 EXIST CL\n";
// minor mrege // minor mrege
scan_trans_part_ctx_.clear_all(); scan_trans_part_ctx_.clear_all();
...@@ -1941,11 +1941,11 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_uncommitted_row_commit) ...@@ -1941,11 +1941,11 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_uncommitted_row_commit)
ObExtStoreRange range; ObExtStoreRange range;
const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n" const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n"
"0 var0 -9 -11 9 12 EXIST CL\n" "0 var0 -9 0 9 12 EXIST CL\n"
"1 var1 -18 -35 7 11 EXIST C\n" "1 var1 -18 0 7 11 EXIST C\n"
"1 var1 -4 0 NOP 9 EXIST CL\n" "1 var1 -4 0 NOP 9 EXIST CL\n"
"2 var2 -9 -25 18 7 EXIST CF\n" "2 var2 -9 0 18 7 EXIST CF\n"
"2 var2 -4 -15 NOP 7 EXIST L\n"; "2 var2 -4 0 NOP 7 EXIST CL\n";
// minor mrege // minor mrege
...@@ -2043,11 +2043,11 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_uncommitted_row_commit2 ...@@ -2043,11 +2043,11 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_uncommitted_row_commit2
ObExtStoreRange range; ObExtStoreRange range;
const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n" const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n"
"0 var0 -9 -11 9 12 EXIST CL\n" "0 var0 -9 0 9 12 EXIST CL\n"
"1 var1 -18 -12 7 6 EXIST C\n" "1 var1 -18 0 7 6 EXIST C\n"
"1 var1 -4 0 NOP 9 EXIST CL\n" "1 var1 -4 0 NOP 9 EXIST CL\n"
"2 var2 -9 -25 18 7 EXIST CF\n" "2 var2 -9 0 18 7 EXIST CF\n"
"2 var2 -4 -15 NOP 7 EXIST L\n"; "2 var2 -4 0 NOP 7 EXIST CL\n";
// minor mrege // minor mrege
...@@ -2123,8 +2123,8 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_multi_delete_row) ...@@ -2123,8 +2123,8 @@ TEST_F(TestNewMinorFuserMerge, test_new_minor_fuser_with_multi_delete_row)
ObExtStoreRange range; ObExtStoreRange range;
const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n" const char* result1 = "bigint var bigint bigint bigint bigint flag multi_version_row_flag\n"
"1 var1 -40 -12 27 NOP EXIST C\n" "1 var1 -40 0 27 NOP EXIST C\n"
"1 var1 -18 -10 NOP NOP DELETE C\n" "1 var1 -18 0 NOP NOP DELETE C\n"
"1 var1 -4 0 NOP 9 EXIST CL\n"; "1 var1 -4 0 NOP 9 EXIST CL\n";
// minor mrege // minor mrege
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册