提交 e49ecdcc 编写于 作者: C chinaxing 提交者: wangzelin.wzl

[4.0] remove unused savepoint logic in RedoLog's mutatorRow

上级 109c3518
......@@ -57,7 +57,7 @@ struct RedoDataNode
uint32_t modify_count_;
uint32_t acc_checksum_;
int64_t version_;
int32_t flag_;
int32_t flag_; // currently, unused
int64_t seq_no_;
ObITransCallback *callback_;
common::ObTabletID tablet_id_;
......
......@@ -39,7 +39,7 @@ ObMemtableMutatorMeta::ObMemtableMutatorMeta():
data_crc_(0),
data_size_(0),
row_count_(0),
have_rollback_to_savepoint_(1)
unused_(0)
{
}
......@@ -159,8 +159,8 @@ int64_t ObMemtableMutatorMeta::to_string(char *buffer, const int64_t length) con
{
int64_t pos = 0;
common::databuff_printf(buffer, length, pos,
"%p data_crc=%x meta_size=%d data_size=%d row_count=%d have_rollback_to_savepoint=%d",
this, data_crc_, meta_size_, data_size_, row_count_, have_rollback_to_savepoint_);
"%p data_crc=%x meta_size=%d data_size=%d row_count=%d",
this, data_crc_, meta_size_, data_size_, row_count_);
return pos;
}
......@@ -169,23 +169,6 @@ bool ObMemtableMutatorMeta::is_row_start() const
return ObTransRowFlag::is_row_start(flags_);
}
int ObMemtableMutatorMeta::set_savepoint(const uint32_t flag) {
int ret = OB_SUCCESS;
if (flag != 0 && flag != 1) {
TRANS_LOG(WARN, "invalid argument", K(flag));
ret = OB_INVALID_ARGUMENT;
} else {
have_rollback_to_savepoint_ = flag;
}
return ret;
}
uint32_t ObMemtableMutatorMeta::get_savepoint() const {
return have_rollback_to_savepoint_;
}
//only meta_crc is newly generated here, other information will keep unchanged
void ObMemtableMutatorMeta::generate_new_header()
{
......@@ -863,7 +846,6 @@ int ObMutatorWriter::append_row_kv(
const ObMemtableKey *mtk = &redo.key_;
uint64_t cluster_version = 0;
bool is_with_head = true;
uint32 have_rollback_to_savepoint = redo.flag_;
if (OB_ISNULL(redo.callback_)) {
is_with_head = false;
} else if (OB_FAIL(redo.callback_->get_cluster_version(cluster_version))) {
......@@ -918,9 +900,6 @@ int ObMutatorWriter::append_row_kv(
}
} else if (OB_FAIL(meta_.inc_row_count())) {
TRANS_LOG(WARN, "meta inc_row_count failed", K(ret));
} else if (have_rollback_to_savepoint == 1 &&
OB_FAIL(meta_.set_savepoint(have_rollback_to_savepoint))) {
TRANS_LOG(WARN, "set savepoint flag failed", K(ret));
} else {
buf_.get_position() = tmp_pos;
}
......@@ -938,7 +917,6 @@ int ObMutatorWriter::append_row(
const bool is_with_head)
{
int ret = OB_SUCCESS;
uint32 have_rollback_to_savepoint = row.get_savepoint_flag();
ObMutatorRowHeader row_header;
row_header.mutator_type_ = MutatorType::MUTATOR_ROW;
//TODO replace pkey with tablet_id for clog_encrypt_info
......@@ -964,9 +942,6 @@ int ObMutatorWriter::append_row(
}
} else if (OB_FAIL(meta_.inc_row_count())) {
TRANS_LOG(WARN, "meta inc_row_count failed", K(ret));
} else if (have_rollback_to_savepoint == 1 &&
OB_FAIL(meta_.set_savepoint(have_rollback_to_savepoint))) {
TRANS_LOG(WARN, "set savepoint flag failed", K(ret));
} else {
buf_.get_position() = tmp_pos;
}
......
......@@ -66,8 +66,6 @@ public:
int64_t get_meta_size() const { return meta_size_; }
int64_t get_data_size() const { return data_size_; }
bool is_row_start() const;
int set_savepoint(const uint32_t is_savepoint);
uint32_t get_savepoint() const;
public:
int64_t get_serialize_size() const;
......@@ -87,7 +85,7 @@ private:
uint32_t data_crc_;
uint32_t data_size_;
uint32_t row_count_;
uint32_t have_rollback_to_savepoint_;
uint32_t unused_;
DISALLOW_COPY_AND_ASSIGN(ObMemtableMutatorMeta);
};
......@@ -190,7 +188,7 @@ public:
share::ObEncryptMeta &final_encrypt_meta,
share::ObCLogEncryptStatMap &encrypt_stat_map,
const bool is_big_row = false);
uint32_t get_savepoint_flag() const { return flag_; };
uint32_t get_flag() const { return flag_; };
TO_STRING_KV(K_(row_size),
K_(table_id),
......@@ -212,7 +210,7 @@ public:
ObRowData old_row_;
uint32_t acc_checksum_;
int64_t version_;
int32_t flag_; // savepoint flag
int32_t flag_; // currently, unused
uint8_t rowid_version_;
};
......
......@@ -74,7 +74,6 @@ int ObRedoLogGenerator::fill_redo_log(char *buf,
} else {
helper.reset();
ObMutatorWriter mmw;
mmw.get_meta().set_savepoint(0);
mmw.set_buffer(buf, buf_len - buf_pos);
RedoDataNode redo;
TableLockRedoDataNode table_lock_redo;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册