sopel39 opened a new pull request, #11781:
URL: https://github.com/apache/iceberg/pull/11781

   It was observed that with high concurrency/high workload scenario cluster 
deadlocks due to manifest readers waiting for connection from S3 pool.
   
   Specifically, ManifestGroup#plan will create ManifestReader per every 
ParallelIterable.Task. These readers will effectively hold onto S3 connection 
from the pool. When ParallelIterable queue is full, Task will be tabled for 
later use.
   
   Consider scenario:
   S3 connection pool size=1
   approximateMaxQueueSize=1
   workerPoolSize=1
   
   ParallelIterable1: starts TaskP1
   ParallelIterable1: TaskP1 produces result, queue gets full, TaskP1 is put on 
hold (holds S3 connection)
   ParallelIterable2: starts TaskP2, TaskP2 is scheduled on workerPool but is 
blocked on S3 connection pool
   ParallelIterable1: result gets consumed, TaskP1 is scheduled again
   ParallelIterable1: TaskP1 waits for workerPool to be free, but TaskP2 is 
waiting for TaskP1 to release connection
   
   The fix make sure Task is finished once it's started. This way limited 
resources like connection pool are not put on hold. Queue size might exceed 
strict limits, but it should still be bounded.
   
   Fixes https://github.com/apache/iceberg/issues/11768


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

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to