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

[Enhancement] Remove unnecessary absolute value calculations #8055

Open
1 task done
Willhow-Gao opened this issue Apr 23, 2024 · 0 comments · May be fixed by #8056
Open
1 task done

[Enhancement] Remove unnecessary absolute value calculations #8055

Willhow-Gao opened this issue Apr 23, 2024 · 0 comments · May be fixed by #8056

Comments

@Willhow-Gao
Copy link
Contributor

Before Creating the Enhancement Request

  • I have confirmed that this should be classified as an enhancement rather than a bug/feature.

Summary

I think there are unnecessary absolute value operation in class TopicPublishInfo. Because method sendQueue.incrementAndGet() must return a non-negative number.If possible, I hope I can modify it and make some contributions to open source
image
image

Motivation

Reduce unnecessary calculations and consumption

Describe the Solution You'd Like

change Math.abs(sendQueue.incrementAndGet() % messageQueueList.size()) to sendQueue.incrementAndGet() % messageQueueList.size()

Describe Alternatives You've Considered

change Math.abs(sendQueue.incrementAndGet() % messageQueueList.size()) to sendQueue.incrementAndGet() % messageQueueList.size()

Additional Context

No response

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

Successfully merging a pull request may close this issue.

1 participant