-
Notifications
You must be signed in to change notification settings - Fork 55
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
Offset acknowledgment - Add logic to persist/dump offset only after records are persisted to ClickHouse #230
Comments
@AlmostIvanSidorov
|
@subkanthi I have added tests (same scenario as you wrote and stress scenario with parallel restarts of ClickHouse and inserts, updates and deletes in MySQL. The final results of replication are correct for clickhouse_debezium_embedded:2023-04-25. |
Multiple retries could also risk the queue getting bigger (as we keep adding records from Debezium)
|
The issue was manually verified by the Altinity QA team and marked as qa-verified. Build used for testing: We've validated that after processing batches, the |
Add logic to persist records to clickhouse and increment the offset
There is an event callback to get batch of records.
There are 2 pieces of logic that needs to be implemented.
DbWriter
so that it can be used to commit the offsets after the records are merged to ClickHouse.From the documentation the committer object has to be acknowledged for every record.
/**
*/
void handleBatch(List records, RecordCommitter committer) throws InterruptedException;
As mentioned in the Javadoc, the
RecordCommitter
object is to be called for each record and once each batch is finished.The
RecordCommitter
interface is threadsafe, which allows for flexible processing of records.The text was updated successfully, but these errors were encountered: