maytasm commented on a change in pull request #10467:
URL: https://github.com/apache/druid/pull/10467#discussion_r500521909
##########
File path:
extensions-core/kinesis-indexing-service/src/main/java/org/apache/druid/indexing/kinesis/KinesisRecordSupplier.java
##########
@@ -552,8 +552,11 @@ public void start()
}
}
+ /**
+ * This method is synchronized because multiple threads can attempt to close
the record supplier concurrently
+ */
@Override
- public void close()
+ public synchronized void close()
Review comment:
Maybe it is fine to leave the KinesisRecordSupplier and
KafkaRecordSupplier as what it was before (without the synchronized). I think
it is sufficient to fix this bug with just the change in
TimedShutoffInputSourceReader. The change already make the iterator.close()
from the TimedShutoffInputSourceReader idempotent, fix race/concurrent issue.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]