DBZ-5031 Additional logging when offset flushing is not allowed
This commit is contained in:
parent
38726a8451
commit
3e288b8385
@ -397,16 +397,17 @@ private void maybeWarnAboutGrowingWalBacklog(boolean dispatched) {
|
||||
@Override
|
||||
public void commitOffset(Map<String, ?> offset) {
|
||||
try {
|
||||
if (!lsnFlushingAllowed) {
|
||||
return;
|
||||
}
|
||||
|
||||
ReplicationStream replicationStream = this.replicationStream.get();
|
||||
final Lsn commitLsn = Lsn.valueOf((Long) offset.get(PostgresOffsetContext.LAST_COMMIT_LSN_KEY));
|
||||
final Lsn changeLsn = Lsn.valueOf((Long) offset.get(PostgresOffsetContext.LAST_COMPLETELY_PROCESSED_LSN_KEY));
|
||||
final Lsn lsn = (commitLsn != null) ? commitLsn : changeLsn;
|
||||
|
||||
if (replicationStream != null && lsn != null) {
|
||||
if (!lsnFlushingAllowed) {
|
||||
LOGGER.info("Received offset commit request on '{}', but ignoring it. LSN flushing is not allowed yet", lsn);
|
||||
return;
|
||||
}
|
||||
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug("Flushing LSN to server: {}", lsn);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user