Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-16365

awaitTermination() result is not checked

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Reopened
    • Not a Priority
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      There are three places in production code where awaitTermination() result is not checked: BlockingGrpcPubSubSubscriber (io.grpc.ManagedChannel), PubSubSink (ManagedChannel), and FileCache (ExecutorService).

      Calling awaitTermination() without checking the result seems to make little sense to me.

      If it's genuinely important to await termination, e. g. for concurrency reasons, or because we are awaiting heavy resource release and if the resource is not released we have a resource leak, then it seems reasonable to at least check the result of awaitTermination() and log a warning if the result is negative, allowing to debug potential problem in the future.

      Otherwise, if we don't really care about awaiting termination, then maybe it's better to not call awaitTermination() at all.

      Attachments

        Activity

          People

            Unassigned Unassigned
            leventov Roman Leventov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: