Skip to content
New issue

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

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

Already on GitHub? # to your account

RoundRobinMasterSlaveLoadBalanceAlgorithm throw an ArrayIndexOutOfBoundsException #1265

Closed
feelwing1314 opened this issue Sep 17, 2018 · 0 comments
Assignees

Comments

@feelwing1314
Copy link

For English only, other languages we will close it directly.

Please answer these questions before submitting your issue. Thanks!

Before submit a new issue, please check existed issue first, to make sure your issue is not a duplicated one.

Which version of Sharding-Sphere do you using?

3.0.0.M3

Which project do you using? Sharding-JDBC or Sharding-Proxy?

Sharding-JDBC

Expected behavior

RoundRobinMasterSlaveLoadBalance always be OK

Actual behavior

after roundrobin Integer.MAX_VALUE times, will throw an ArrayIndexOutOfBoundsException.

Reason analyze

the AtomicInteger's getAndIncrement() may produce an negative numbers.

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc

For bug report, please MUST provide the reproduce example codes (such as a github link).

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants