Github user zsxwing commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9143#discussion_r42724272
  
    --- Diff: 
streaming/src/main/scala/org/apache/spark/streaming/scheduler/ReceiverTracker.scala
 ---
    @@ -428,6 +441,9 @@ class ReceiverTracker(ssc: StreamingContext, 
skipReceiverLaunch: Boolean = false
         private val submitJobThreadPool = ExecutionContext.fromExecutorService(
           ThreadUtils.newDaemonCachedThreadPool("submit-job-thead-pool"))
     
    +    private val walBatchingThreadPool = 
ExecutionContext.fromExecutorService(
    --- End diff --
    
    It's better to shutdown this thread pool in `onStop`. If `addBlockAsync` is 
very slow, we may exhaust threads because the number of `block` could be a big 
number. How about making `addBlockAsync` become real asynchronous. The 
`addBlockAsync` would become
    
    ```
    def addBlockAsync(event): Future[...] = {
       put the event to queue with a Promise
       promise.future.mapTo { v => 
           do some work after writing 
       }
    }
    ```


---
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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to