yuzelin commented on code in PR #21133:
URL: https://github.com/apache/flink/pull/21133#discussion_r1022313111
##########
flink-table/flink-sql-gateway/src/main/java/org/apache/flink/table/gateway/service/SqlGatewayServiceImpl.java:
##########
@@ -311,8 +340,29 @@ public GatewayInfo getGatewayInfo() {
return GatewayInfo.INSTANCE;
}
+ //
--------------------------------------------------------------------------------------------
+
@VisibleForTesting
public Session getSession(SessionHandle sessionHandle) {
return sessionManager.getSession(sessionHandle);
}
+
+ /** Fetch all results for configuring session. */
+ private ResultSet fetchConfigureSessionResult(
+ SessionHandle sessionHandle, OperationHandle operationHandle) {
+ ResultSet firstResult = fetchResults(sessionHandle, operationHandle,
0, Integer.MAX_VALUE);
+ while (firstResult == ResultSet.NOT_READY_RESULTS) {
+ firstResult = fetchResults(sessionHandle, operationHandle, 0,
Integer.MAX_VALUE);
Review Comment:
I can't understand exactly what you mean.
In my opinion, if some operations are executed synchronously, the result
would be ready after the execution, so fetchResults will wait for some time and
then get a ready result, and I think here won't be busy wait. Otherwise, if the
operation is executed asynchronously, the execution result may not be ready
after invoking fetchResult, and here will be busy wait.
The current design of result fetching is asynchronous, so here will be busy
wait.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]