-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ISSUE-92] fix bug that flink never flush lsn to PG #107
Conversation
Hi @eric3zhao , did you validate whether this PR works well in your production envrionment? Is it possible to add a test to cover this? Besides, could you drop the first commit which has been merged into master? |
@wuchong I have not validate this in PRD environment, I only do some test in DEV. test case is:
read offset info from checkpoint
use
compare 358680102240 -> 0x5383000560 -> 53/83000560 os offset in checkpoint equals to confirmed_flush_lsn in PG I also want to write a unit test for this, but I have no idea how to compare the offset in the checkpoint with the lsn in the database in java code last, I checkout the branch from |
Please do not use "git merge" to rebase branches, otherwise the changes is hard to track. Please use "git rebase" instead. |
sorry, but I have already push the commits to the remote, should I create a new PR based on master? |
You can force push the branch . |
…and flush lsn to pg after offset was writen to checkpoint
1328a28
to
4569c6c
Compare
done |
that's great! i found the same situation in my postgres database in these days, it is luck for me to found this PR, i hope this PR will merge into master as soon as possible, thanks for the commitors @eric3zhao @wuchong |
Thanks for the contribution @eric3zhao . However, I think there are 3 problem in the PR:
I have fixed the problem in 4127661. |
great job, but I recommend update debeziumOffset to the heartbeat‘s offset when received heartbeat record, not just skip it if (isHeartbeatEvent(record)) {
emitRecordsUnderCheckpointLock(new ArrayDeque<>(), record.sourcePartition(), record.sourceOffset());
continue;
} because, if skip heartbeat record, offset is updated only when the table data is updated. Suppose I set |
@eric3zhao , you are right, otherwise the LSN can't be advanced if there is no updates. But we only need to update Do you want to contribute a pull request? |
heartbeat.interval.ms
option