提交 e9dc0113 编写于 作者: X xj0 提交者: LINGuanRen

data coverage in multi htable_put

上级 53586494
......@@ -362,6 +362,7 @@ int ObTableBatchExecuteP::htable_put()
}
}
}
int tmp_ret = ret;
if (OB_FAIL(end_trans(OB_SUCCESS != ret, req_, get_timeout_ts()))) {
LOG_WARN("failed to end trans");
......
......@@ -1249,6 +1249,8 @@ int ObHTablePutExecutor::htable_put(const ObTableBatchOperation &mutations, int6
if (0 == now_ms) {
now_ms = -ObHTableUtils::current_time_millis();
}
// store not set timestamp cell for tmp
ObArray<ObObj*> reset_timestamp_obj;
//ObString htable_row;
const int64_t N = mutations.count();
for (int64_t i = 0; OB_SUCCESS == ret && i < N; ++i)
......@@ -1275,6 +1277,7 @@ int ObHTablePutExecutor::htable_put(const ObTableBatchOperation &mutations, int6
// update timestamp iff LATEST_TIMESTAMP
if (ObHTableConstants::LATEST_TIMESTAMP == timestamp) {
hbase_timestamp.set_int(now_ms);
reset_timestamp_obj.push_back(&hbase_timestamp);
}
}
}
......@@ -1287,6 +1290,14 @@ int ObHTablePutExecutor::htable_put(const ObTableBatchOperation &mutations, int6
if (OB_TRY_LOCK_ROW_CONFLICT != ret) {
LOG_WARN("failed to multi_delete", K(ret));
}
if ( OB_TRANSACTION_SET_VIOLATION == ret ) {
// When OB_TRANSACTION_SET_VIOLATION happen, there will not refresh timestamp
// and will cover old row data in processor local retry. so here reset timestamp
// to origin LATEST_TIMESTAMP in order to retry in queue and refresh timestamp force.
for (int64_t i = 0; i < reset_timestamp_obj.count(); i++) {
reset_timestamp_obj.at(i)->set_int(ObHTableConstants::LATEST_TIMESTAMP);
}
}
} else {
affected_rows = 1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册