Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix](JDK17) The objects stored in PriorityQueue must implement the Comparable interface #30050

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

BePPPower
Copy link
Contributor

@BePPPower BePPPower commented Jan 17, 2024

Proposed changes

Issue Number: close #xxx

The objects stored in PriorityQueue must implement the Comparable interface or passed into the customized Comparator.

If we don't do this, run the program in the JDK17 environment will report an exception:

Caused by: java.lang.AssertionError: Expect exception msg contains 'query wait timeout', but meet
'java.sql.SQLException: ClassCastException,
msg: class org.apache.doris.resource.workloadgroup.QueueToken cannot be cast to class java.lang.Comparable 
(org.apache.doris.resource.workloadgroup.QueueToken is in unnamed module of loader 'app'; java.lang.Comparable is in module java.base of loader 'bootstrap')'

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@BePPPower BePPPower changed the title [fix](JDK17) fix regression test [fix](JDK17) The objects stored in PriorityQueue must implement the Comparable interface Jan 17, 2024
@yiguolei yiguolei merged commit 6eceef6 into apache:doris-jdk17 Jan 22, 2024
8 of 11 checks passed
zy-kkk pushed a commit that referenced this pull request Jan 26, 2024
BePPPower added a commit to BePPPower/doris that referenced this pull request Jan 31, 2024
morningman pushed a commit that referenced this pull request Jan 31, 2024
… `Comparable` interface (#30050) (#30625)

Issue Number:  #30484 

The objects stored in PriorityQueue must implement the Comparable interface or passed into the customized `Comparator`. 

If we don't do this, run the program in the JDK17 environment will report an exception:
```java
Caused by: java.lang.AssertionError: Expect exception msg contains 'query wait timeout', but meet
'java.sql.SQLException: ClassCastException,
msg: class org.apache.doris.resource.workloadgroup.QueueToken cannot be cast to class java.lang.Comparable 
(org.apache.doris.resource.workloadgroup.QueueToken is in unnamed module of loader 'app'; java.lang.Comparable is in module java.base of loader 'bootstrap')'
```
yiguolei pushed a commit that referenced this pull request Jan 31, 2024
… `Comparable` interface (#30050) (#30625)

Issue Number:  #30484 

The objects stored in PriorityQueue must implement the Comparable interface or passed into the customized `Comparator`. 

If we don't do this, run the program in the JDK17 environment will report an exception:
```java
Caused by: java.lang.AssertionError: Expect exception msg contains 'query wait timeout', but meet
'java.sql.SQLException: ClassCastException,
msg: class org.apache.doris.resource.workloadgroup.QueueToken cannot be cast to class java.lang.Comparable 
(org.apache.doris.resource.workloadgroup.QueueToken is in unnamed module of loader 'app'; java.lang.Comparable is in module java.base of loader 'bootstrap')'
```
yiguolei pushed a commit that referenced this pull request Jan 31, 2024
… `Comparable` interface (#30050) (#30625)

Issue Number:  #30484 

The objects stored in PriorityQueue must implement the Comparable interface or passed into the customized `Comparator`. 

If we don't do this, run the program in the JDK17 environment will report an exception:
```java
Caused by: java.lang.AssertionError: Expect exception msg contains 'query wait timeout', but meet
'java.sql.SQLException: ClassCastException,
msg: class org.apache.doris.resource.workloadgroup.QueueToken cannot be cast to class java.lang.Comparable 
(org.apache.doris.resource.workloadgroup.QueueToken is in unnamed module of loader 'app'; java.lang.Comparable is in module java.base of loader 'bootstrap')'
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants