Skip to content

Commit

Permalink
Added logic to commit batch in single threaded mode
Browse files Browse the repository at this point in the history
  • Loading branch information
subkanthi committed Sep 9, 2024
1 parent ab888d7 commit a603892
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,14 @@ public void persistRecords(List<ClickHouseStruct> records) {
//throw new RuntimeException(e);
log.error("Error marking records as processed"+ e);
}

if(record.isLastRecordInBatch()) {
try {
record.getCommitter().markBatchFinished();
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
});
}
} catch(Exception e) {
Expand Down

0 comments on commit a603892

Please sign in to comment.