ammu20-dev commented on PR #25656: URL: https://github.com/apache/flink/pull/25656#issuecomment-2582186905
> As per the comments please could you investigate: > > * potential regressions > * the loss of the user class loader > * whether existing option could solve this without a code change @davidradl > * whether existing option could solve this without a code change Existing options might not help us in solving the issue as stated here in this [comment](https://github.com/apache/flink/pull/25656#discussion_r1904076204) > * the loss of the user class loader I noticed that at this line here https://github.com/apache/flink/blob/4b306699811af0b6ff2cb862914adfda56345996/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#L2472 the class loader expected as per naming convention is user class loader. But while debugging the issue I found that the class loader coming here is the App class loader and not the user class loader. Inorder to pull in the user class loader, I am consuming the user class loader from resourceManager like [this](https://github.com/apache/flink/blob/dfd9e0e644a5ee9d0d3238c9f03a2942dc4a52e6/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableEnvironmentImpl.java#L1036) and setting the user class loader as the thread context class loader and later used [here](https://github.com/apache/flink/blob/dfd9e0e644a5ee9d0d3238c9f03a2942dc4a52e6/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecution Environment.java#L2472). This is how the issue was fixed. > * potential regressions Analysing through the code, I can confirm that the scope of this fix is limited to the sql execution part and I see minimum possibility on regressions. Also I am restoring the thread class loader back to the original class loader post execution of the sql query([here](https://github.com/apache/flink/blob/dfd9e0e644a5ee9d0d3238c9f03a2942dc4a52e6/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableEnvironmentImpl.java#L1063)) so that it doesn't have any further impact. -- 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...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org