apache / apache/pulsar

[Bug] Pulsar collection classes with Long pair keys contain a bug in the hash bucket algorithm implementation

Open
#21,106 1 comment 0 reactions 1 assignee Claimed by @lhotari View on GitHub
Stale type/bug
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.

### Version

any

### Minimal reproduce step

Pulsar collection classes with Long pair keys contain a bug in the hash bucket algorithm implementation. This happens whenever the collections are used.

### What did you expect to see?

Hash bucket algorithm should be properly implemented.

### What did you see instead?

This bug wastes CPU cycles because of the inefficient storage and retrieval since collisions will be very likely when the used capacity of the collection implementation increases.

### Anything else?

_No response_

### Are you willing to submit a PR?

- [X] I'm willing to submit a PR!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.