File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
source/src/main/java/com/trustpilot/connector/dynamodb/kcl Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -211,14 +211,19 @@ private void onTerminate(ShutdownInput shutdownInput) throws InvalidStateExcepti
211
211
if (lastProcessedSeqNo != null && !lastProcessedSeqNo .isEmpty ()) {
212
212
ShardInfo processorRegister = shardRegister .getOrDefault (this .shardId , null );
213
213
if (processorRegister != null ) {
214
+ int i = 0 ;
214
215
while (!processorRegister .getLastCommittedRecordSeqNo ().equals (this .lastProcessedSeqNo )) {
215
- LOGGER .info (
216
- "Shard ended. Waiting for all data table: {} from shard: {} to be committed. " +
217
- "lastCommittedRecordSeqNo: {} lastProcessedSeqNo: {}" ,
218
- tableName ,
219
- shardId ,
220
- processorRegister .getLastCommittedRecordSeqNo (),
221
- this .lastProcessedSeqNo );
216
+ if (i % 20 == 0 ) {
217
+ LOGGER .info (
218
+ "Shard ended. Waiting for all data table: {} from shard: {} to be committed. " +
219
+ "lastCommittedRecordSeqNo: {} lastProcessedSeqNo: {}" ,
220
+ tableName ,
221
+ shardId ,
222
+ processorRegister .getLastCommittedRecordSeqNo (),
223
+ this .lastProcessedSeqNo );
224
+ }
225
+ i += 1 ;
226
+
222
227
Thread .sleep (500 );
223
228
}
224
229
}
You can’t perform that action at this time.
0 commit comments