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

[Bug] The sortByResource method in ResourceNodeSelectRule violates the general contract of comparators #4911

Closed
2 tasks done
sjgllgh opened this issue Sep 25, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@sjgllgh
Copy link
Contributor

sjgllgh commented Sep 25, 2023

Search before asking

  • I searched the issues and found no similar issues.

Linkis Component

linkis-computation-governance

Steps to reproduce

  1. When there are many deployed ECMs and the concurrency is high, an exception may be thrown: Comparison method violates its general contract!
  2. The comparison method provided by the code is: when memory, CPU, and the number of instances are all large, return -1; when memory, CPU, and the number of instances are all equal, return 0; in all other cases, return 1.
  3. There may be situations where, when the memory of A is larger than that of B, and the CPU of B is larger than that of A, the comparison between A and B will always return 1.

Expected behavior

Modify the rules of the comparator to prevent violating the general contract of the comparator.

Your environment

  • Linkis version used: 1.4.0
  • Environment name and version:
    • jdk 1.8.0_144

Anything else

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!
@sjgllgh sjgllgh added the bug Something isn't working label Sep 25, 2023
@github-actions
Copy link

😊 Welcome to the Apache Linkis community!!

We are glad that you are contributing by opening this issue.

Please make sure to include all the relevant context.
We will be here shortly.

If you are interested in contributing to our website project, please let us know!
You can check out our contributing guide on
👉 How to Participate in Project Contribution.

Community

WeChat Assistant WeChat Public Account

Mailing Lists

Name Description Subscribe Unsubscribe Archive
[email protected] community activity information subscribe unsubscribe archive

@sjgllgh sjgllgh mentioned this issue Sep 25, 2023
7 tasks
@sjgllgh sjgllgh closed this as completed Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant