Github user StephanEwen commented on the pull request:
https://github.com/apache/flink/pull/1243#issuecomment-148737070
I disagree with the locking in the base class. If you look at the
documenation for sources, it states how to make sure you hold the checkpoint
lock when emitting the elements and updating the state (here IDs to be
remembered). That is the encouraged mechanism, as it gives the exactly once
guarantee
If you lock properly there, there is no need to hold any lock
In some sense all modifications to the base class are a bit tricky:
- The locks are not required if you properly hold the checkpoint lock
- the open/close checks are not necessary as well, this should be
guaranteed by the runtime already
- the logging will probably bring down the system, if used in a real
setting with decent throughput.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---