ochanism opened a new issue, #12220:
URL: https://github.com/apache/iceberg/issues/12220

   ### Feature Request / Improvement
   
   I implemented JAVA server programs to manage Iceberg tables using Iceberg 
JAVA SDK (1.7.1).
   But I've been suffering from an ungraceful shutdown issue.
   The servers are running on a Kubernetes cluster. When updating the servers, 
a SITERM signal is raised.
   At this time, I want to shut down active requests gracefully. But the 
ThreadPools is shut down in advance before completing the active requests.
   Eventually, the active requests are aborted with an executor exception.
   
   - related code links
   
   
https://github.com/apache/iceberg/blob/20b18acb77847153c743bbd63e799f5c61a71d82/core/src/main/java/org/apache/iceberg/util/ThreadPools.java#L133
   
   
https://github.com/google/guava/blob/ccd06f2eb635b085ed651edba406116a3665155b/guava/src/com/google/common/util/concurrent/MoreExecutors.java#L238
   
   Internally, the Guava library is used to manage ExecutorService and the 
library adds a shutdown hook.
   Currently, there is no way to control the shutdown hook at the application 
layer.
   What about adding an option to control the shutdown hook for 
application-level graceful shutdown?
   
   
   ---
   ADDITIONAL QUESTION: 
     - Is there any plan to use a virtual thread for the ThreadPools with JDK 
21?
     - I think it can be done conditionally only when the virtual thread is 
available by a used JDK.
   
   
   
   
   ### Query engine
   
   None
   
   ### Willingness to contribute
   
   - [x] I can contribute this improvement/feature independently
   - [x] I would be willing to contribute this improvement/feature with 
guidance from the Iceberg community
   - [ ] I cannot contribute this improvement/feature at this time


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