liutang123 commented on a change in pull request #6159:
URL: https://github.com/apache/incubator-doris/pull/6159#discussion_r665517707
##########
File path: fe/fe-core/src/main/java/org/apache/doris/qe/QeProcessorImpl.java
##########
@@ -79,10 +88,58 @@ public void registerQuery(TUniqueId queryId, QueryInfo
info) throws UserExceptio
}
}
+ public void registerInstances(TUniqueId queryId, Integer instancesNum)
throws UserException {
+ if (!coordinatorMap.containsKey(queryId)) {
+ throw new UserException("query not exists in coordinatorMap:" +
DebugUtil.printId(queryId));
+ }
+ QueryInfo queryInfo = coordinatorMap.get(queryId);
+ if (queryInfo.getConnectContext() != null &&
+
!Strings.isNullOrEmpty(queryInfo.getConnectContext().getQualifiedUser())
+ ) {
+ String user = queryInfo.getConnectContext().getQualifiedUser();
+ long maxQueryInstances =
queryInfo.getConnectContext().getCatalog().getAuth().getMaxQueryInstances(user);
Review comment:
If save `maxQueryInstances` in `ConnectionContext `, we can not change
it after `ConnectionContext` created.
`getMaxQueryInstances` will try to obtain an read lock in PlaoAuth. I think
the cost should be very small, because it is a situation of reading more and
writing less.
However, we can update parameters and disconnect all links to make
parameters take effect.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]