gaborgsomogyi commented on a change in pull request #23156: [SPARK-24063][SS] 
Add maximum epoch queue threshold for ContinuousExecution
URL: https://github.com/apache/spark/pull/23156#discussion_r260024405
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
 ##########
 @@ -1413,6 +1413,14 @@ object SQLConf {
       .booleanConf
       .createWithDefault(true)
 
+  val CONTINUOUS_STREAMING_EPOCH_BACKLOG_QUEUE_SIZE =
+    buildConf("spark.sql.streaming.continuous.epochBacklogQueueSize")
+      .internal()
+      .doc("The max number of entries to be stored in queue to wait for late 
epochs. " +
+        "If this parameter is exceeded by the size of the queue, stream will 
stop with an error.")
+      .intConf
+      .createWithDefault(10000)
 
 Review comment:
   If the cluster is healthy and all partitions are processing well then the 
queue is not building up. The problem comes when for example one partition 
stuck somehow. The worst case if this partition is dead and 10k items from all 
other partitions are processed and waiting for this single one. Jose stated the 
same thing 
[here](https://github.com/apache/spark/pull/21392#discussion_r190112873). 
Statistics only from local cluster which is definitely not PROD stuff.
   
   Partition stuck is hard to detect and I still think it's a good way (not 
everybody check the logs during streaming, if there is no log aggregation only 
at the end of the streaming job it will be collected) but we can add 
`failOnQueueThreshold=false` or something similar and declaring this as a soft 
threshold and printing out a warning if reached. `failOnQueueThreshold=true` 
would mean stop the query. If the user sees the warning and the query recovers 
properly the number can still be increased.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to