liutang123 commented on code in PR #35929:
URL: https://github.com/apache/doris/pull/35929#discussion_r1636703831
##########
fe/fe-core/src/main/java/org/apache/doris/resource/workloadgroup/QueueToken.java:
##########
@@ -50,122 +53,56 @@ public enum TokenState {
private long queueWaitTimeout = 0;
- private String offerResultDetail;
-
- private boolean isTimeout = false;
-
- private final ReentrantLock tokenLock = new ReentrantLock();
- private final Condition tokenCond = tokenLock.newCondition();
-
private long queueStartTime = -1;
private long queueEndTime = -1;
- public QueueToken(TokenState tokenState, long queueWaitTimeout,
- String offerResultDetail) {
+ // Object is just a placeholder, it's meaningless now
+ private CompletableFuture<Object> future;
+ private QueryQueue queue;
+
+ public QueueToken(TokenState tokenState, long queueWaitTimeout, QueryQueue
queryQueue) {
this.tokenId = tokenIdGenerator.addAndGet(1);
this.tokenState = tokenState;
this.queueWaitTimeout = queueWaitTimeout;
- this.offerResultDetail = offerResultDetail;
+ this.queue = queryQueue;
+ this.queueStartTime = System.currentTimeMillis();
+ this.future = new CompletableFuture();
Review Comment:
this.future = new CompletableFuture<>();
--
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]