dao-jun commented on code in PR #23833:
URL: https://github.com/apache/pulsar/pull/23833#discussion_r1909943345
##########
pulsar-common/src/main/java/org/apache/pulsar/common/util/collections/BitSetRecyclable.java:
##########
@@ -1211,6 +1211,9 @@ public void recycle() {
if (recyclerHandle != null) {
this.clear();
recyclerHandle.recycle(this);
+ // Reset with null so that recycle() can be called many times but
only the 1st time takes effect.
Review Comment:
+1, use bitset here directly will not lead to performance regression, and
makes it more clearly. The key point is `BitSet#words` field, since we just
wrap the given `ackSet` by BitSet, it is OK to use `BitSet` instead.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]