Fix ra datum store switch block index failed
This commit is contained in:
@ -637,7 +637,7 @@ int ObRADatumStore::add_block_idx(const BlockIndex &bi)
|
|||||||
ret = OB_NOT_INIT;
|
ret = OB_NOT_INIT;
|
||||||
LOG_WARN("not init", K(ret));
|
LOG_WARN("not init", K(ret));
|
||||||
} else {
|
} else {
|
||||||
if (NULL == idx_blk_) {
|
if (!has_index_block()) {
|
||||||
if (OB_FAIL(blocks_.push_back(bi))) {
|
if (OB_FAIL(blocks_.push_back(bi))) {
|
||||||
LOG_WARN("add block index to array failed", K(ret));
|
LOG_WARN("add block index to array failed", K(ret));
|
||||||
} else {
|
} else {
|
||||||
@ -1309,7 +1309,7 @@ int ObRADatumStore::finish_add_row()
|
|||||||
const bool finish_add = true;
|
const bool finish_add = true;
|
||||||
if (OB_FAIL(switch_block(min_size))) {
|
if (OB_FAIL(switch_block(min_size))) {
|
||||||
LOG_WARN("write last block to file failed", K(ret), K(min_size));
|
LOG_WARN("write last block to file failed", K(ret), K(min_size));
|
||||||
} else if (OB_FAIL(switch_idx_block(finish_add))) {
|
} else if (has_index_block() && OB_FAIL(switch_idx_block(finish_add))) {
|
||||||
LOG_WARN("write last index block to file failed", K(ret), K(ret));
|
LOG_WARN("write last index block to file failed", K(ret), K(ret));
|
||||||
} else if (OB_FAIL(get_timeout(timeout_ms))) {
|
} else if (OB_FAIL(get_timeout(timeout_ms))) {
|
||||||
LOG_WARN("get timeout failed", K(ret));
|
LOG_WARN("get timeout failed", K(ret));
|
||||||
|
|||||||
@ -409,6 +409,7 @@ private:
|
|||||||
int read_file(void *buf, const int64_t size, const int64_t offset);
|
int read_file(void *buf, const int64_t size, const int64_t offset);
|
||||||
|
|
||||||
bool need_dump();
|
bool need_dump();
|
||||||
|
inline bool has_index_block() const { return nullptr != idx_blk_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool inited_;
|
bool inited_;
|
||||||
|
|||||||
Reference in New Issue
Block a user