don't print error log when read integrity data in case of fetch log
This commit is contained in:
		@ -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, pwrite_one_log_by_log_storage(leader, entry, max_lsn));
 | 
			
		||||
    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) {
 | 
			
		||||
      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()))) {
 | 
			
		||||
    PALF_LOG(WARN, "PalfGroupBufferIterator init failed", K(ret), K_(palf_id));
 | 
			
		||||
  } 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;
 | 
			
		||||
    LogGroupEntry curr_group_entry;
 | 
			
		||||
    LSN curr_lsn;
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user