BewareMyPower commented on code in PR #20718:
URL: https://github.com/apache/pulsar/pull/20718#discussion_r1261981483
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractBaseDispatcher.java:
##########
@@ -405,6 +415,63 @@ public static void
checkAndApplyReachedEndOfTopicOrTopicMigration(PersistentTopi
}
}
+ public static void readCompactedEntries(TopicCompactionService
topicCompactionService, ManagedCursor cursor,
Review Comment:
Use `protected`.
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -3188,7 +3209,7 @@ public synchronized LongRunningProcessStatus
compactionStatus() {
return
LongRunningProcessStatus.forStatus(LongRunningProcessStatus.Status.RUNNING);
} else {
try {
- if (current.join() == COMPACTION_NEVER_RUN) {
+ if (Objects.equals(current.join(), COMPACTION_NEVER_RUN)) {
Review Comment:
Sorry I don't get it. When does `current.join()` return `-0xfebecffeL`?
In addition,
```java
public static boolean equals(Object a, Object b) {
return (a == b) || (a != null && a.equals(b));
}
```
It's equivalent with `a == b` when `a` and `b` are `Long`.
--
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]