don't print error log when read integrity data in case of fetch log
This commit is contained in:
18
deps/easy/src/io/easy_negotiation.c
vendored
18
deps/easy/src/io/easy_negotiation.c
vendored
@ -58,9 +58,9 @@ static int easy_encode_uint64(char *buf, const uint64_t buf_len, int64_t *pos, u
|
|||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int easy_encode_uint16(char *buf, const uint64_t buf_len, int64_t *pos, uint16_t val)
|
static int easy_encode_uint16(char *buf, const uint64_t buf_len, int64_t *pos, uint16_t val)
|
||||||
{
|
{
|
||||||
int ret = ((NULL != buf) &&
|
int ret = ((NULL != buf) &&
|
||||||
((buf_len - *pos) >= (uint64_t)(sizeof(val)))) ? EASY_OK : EASY_ABORT;
|
((buf_len - *pos) >= (uint64_t)(sizeof(val)))) ? EASY_OK : EASY_ABORT;
|
||||||
@ -170,9 +170,9 @@ static int easy_decode_negotiation_msg(easy_negotiation_msg_t *ne_msg, char *rec
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* easy negotiation packet format
|
* easy negotiation packet format
|
||||||
PACKET HEADER:
|
PACKET HEADER:
|
||||||
+------------------------------------------------------------------------+
|
+------------------------------------------------------------------------+
|
||||||
| negotiation packet header magic(8B) | msg body len (2B)
|
| negotiation packet header magic(8B) | msg body len (2B)
|
||||||
@ -270,9 +270,9 @@ void net_consume_negotiation_msg(int fd, uint64_t magic)
|
|||||||
easy_info_log("consume negotiation buffer %d bytes!", rcv_bytes);
|
easy_info_log("consume negotiation buffer %d bytes!", rcv_bytes);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
easy_info_log("not negotiation msg ! return!");
|
easy_info_log("not negotiation msg ! return!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -216,7 +216,12 @@ TEST_F(TestObSimpleLogDataIntergrity, accumlate_checksum)
|
|||||||
EXPECT_EQ(OB_SUCCESS, make_log_group_entry_partial_error(entry, output_buf, inject));
|
EXPECT_EQ(OB_SUCCESS, make_log_group_entry_partial_error(entry, output_buf, inject));
|
||||||
EXPECT_EQ(OB_SUCCESS, pwrite_one_log_by_log_storage(leader, entry, max_lsn));
|
EXPECT_EQ(OB_SUCCESS, pwrite_one_log_by_log_storage(leader, entry, max_lsn));
|
||||||
EXPECT_EQ(OB_ITER_END, iterator.next());
|
EXPECT_EQ(OB_ITER_END, iterator.next());
|
||||||
EXPECT_EQ(OB_CHECKSUM_ERROR, read_log(leader));
|
int tmp_ret = read_log(leader);
|
||||||
|
if (OB_CHECKSUM_ERROR != tmp_ret && OB_INVALID_DATA != tmp_ret) {
|
||||||
|
int ret = OB_SUCCESS;
|
||||||
|
PALF_LOG(ERROR, "unexpected error", K(tmp_ret));
|
||||||
|
EXPECT_EQ(false, true);
|
||||||
|
}
|
||||||
if (NULL != output_buf) {
|
if (NULL != output_buf) {
|
||||||
ob_free(output_buf);
|
ob_free(output_buf);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3048,6 +3048,10 @@ int PalfHandleImpl::fetch_log_from_storage_(const common::ObAddr &server,
|
|||||||
} else if (OB_FAIL(iterator.init(fetch_start_lsn, get_file_end_lsn, log_engine_.get_log_storage()))) {
|
} else if (OB_FAIL(iterator.init(fetch_start_lsn, get_file_end_lsn, log_engine_.get_log_storage()))) {
|
||||||
PALF_LOG(WARN, "PalfGroupBufferIterator init failed", K(ret), K_(palf_id));
|
PALF_LOG(WARN, "PalfGroupBufferIterator init failed", K(ret), K_(palf_id));
|
||||||
} else {
|
} else {
|
||||||
|
bool need_print_error = false;
|
||||||
|
// NB: Fetch log will be concurrent with truncate, the content on disk will not integrity, need igore
|
||||||
|
// read log error.
|
||||||
|
iterator.set_need_print_error(need_print_error);
|
||||||
LSN each_round_prev_lsn = prev_lsn;
|
LSN each_round_prev_lsn = prev_lsn;
|
||||||
LogGroupEntry curr_group_entry;
|
LogGroupEntry curr_group_entry;
|
||||||
LSN curr_lsn;
|
LSN curr_lsn;
|
||||||
|
|||||||
Reference in New Issue
Block a user