Control debug log frequency for palf.

This commit is contained in:
jiadebinmary@gmail.com
2023-11-01 00:43:33 +00:00
committed by ob-robot
parent 967936da96
commit e9c0888c0c
2 changed files with 7 additions and 3 deletions

View File

@ -3360,8 +3360,10 @@ int LogSlidingWindow::submit_group_log(const LSN &lsn,
PALF_LOG(WARN, "group_entry_header check_integrity failed", K(ret), K_(palf_id), K_(self));
} else if (!leader_can_submit_larger_log_(group_entry_header.get_log_id())) {
ret = OB_EAGAIN;
PALF_LOG(WARN, "sw is full, cannot receive larger log", K(ret), K_(palf_id), K_(self), K(group_entry_header),
"start_id", get_start_id(), K(lsn));
if (REACH_TIME_INTERVAL(100 * 1000)) {
PALF_LOG(WARN, "sw is full, cannot receive larger log", K(ret), K_(palf_id), K_(self), K(group_entry_header),
"start_id", get_start_id(), K(lsn));
}
} else if ((log_id = group_entry_header.get_log_id()) < get_start_id()) {
PALF_LOG(WARN, "this log has slided out, no need receive", K(ret), K_(palf_id), K_(self),
K(group_entry_header), "start_id", get_start_id());

View File

@ -3154,7 +3154,9 @@ int PalfHandleImpl::submit_group_log(const PalfAppendOptions &opts,
"current proposal_id", state_mgr_.get_proposal_id(),
"mode_mgr can_raw_write", mode_mgr_.can_raw_write(), K(opts));
} else if (OB_FAIL(sw_.submit_group_log(lsn, buf, buf_len))) {
PALF_LOG(WARN, "submit_group_log failed", K(ret), K_(palf_id), K_(self), KP(buf), K(buf_len));
if (OB_EAGAIN != ret) {
PALF_LOG(WARN, "submit_group_log failed", K(ret), K_(palf_id), K_(self), KP(buf), K(buf_len));
}
} else {
PALF_LOG(TRACE, "submit_group_log success", K(ret), K_(palf_id), K_(self), K(buf_len), K(lsn));
}