[CP] [Fix] ttl delete
This commit is contained in:
@ -512,7 +512,13 @@ int ObTableTTLDeleteRowIterator::get_next_row(ObNewRow*& row)
|
|||||||
LOG_DEBUG("finish get next row", KR(ret), K(cur_del_rows_), K(limit_del_rows_));
|
LOG_DEBUG("finish get next row", KR(ret), K(cur_del_rows_), K(limit_del_rows_));
|
||||||
} else {
|
} else {
|
||||||
bool is_expired = false;
|
bool is_expired = false;
|
||||||
while(OB_SUCC(ret) && !is_expired && OB_SUCC(ObTableApiScanRowIterator::get_next_row(row, false/*need_deep_copy*/))) {
|
while(OB_SUCC(ret) && !is_expired) {
|
||||||
|
if (OB_FAIL(ObTableApiScanRowIterator::get_next_row(row, false/*need_deep_copy*/))) {
|
||||||
|
if (OB_ITER_END != ret) {
|
||||||
|
LOG_WARN("fail to get next row", K(ret));
|
||||||
|
}
|
||||||
|
last_row_ = nullptr;
|
||||||
|
} else {
|
||||||
last_row_ = row;
|
last_row_ = row;
|
||||||
// NOTE: For hbase table, the row expired if and only if
|
// NOTE: For hbase table, the row expired if and only if
|
||||||
// 1. The row's version exceed maxversion
|
// 1. The row's version exceed maxversion
|
||||||
@ -559,6 +565,7 @@ int ObTableTTLDeleteRowIterator::get_next_row(ObNewRow*& row)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (OB_FAIL(ret)) {
|
if (OB_FAIL(ret)) {
|
||||||
if (ret != OB_ITER_END) {
|
if (ret != OB_ITER_END) {
|
||||||
@ -658,6 +665,7 @@ int ObTableTTLDeleteTask::execute_ttl_delete(ObTableTTLDeleteRowIterator &ttl_ro
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (OB_SUCC(ret) && rowkey_.is_valid()) {
|
if (OB_SUCC(ret) && rowkey_.is_valid()) {
|
||||||
|
// if ITER_END in ttl_row_iter, rowkey_ will not be assigned by last_row_ in this round
|
||||||
uint64_t buf_len = rowkey_.get_serialize_size();
|
uint64_t buf_len = rowkey_.get_serialize_size();
|
||||||
char *buf = static_cast<char *>(allocator_.alloc(buf_len));
|
char *buf = static_cast<char *>(allocator_.alloc(buf_len));
|
||||||
int64_t pos = 0;
|
int64_t pos = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user