You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "zymap (via GitHub)" <gi...@apache.org> on 2024/12/06 02:53:56 UTC
Re: [PR] [improve][broker] Decouple pulsar_storage_backlog_age_seconds metric with backlogQuota check [pulsar]
zymap commented on code in PR #23619:
URL: https://github.com/apache/pulsar/pull/23619#discussion_r1872500745
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -3489,74 +3484,56 @@ private void updateResultIfNewer(TimeBasedBacklogQuotaCheckResult updatedResult)
}
- /**
- * @return determine if backlog quota enforcement needs to be done for topic based on time limit
- */
- public CompletableFuture<Boolean> checkTimeBacklogExceeded() {
+ public CompletableFuture<Void> updateOldPositionInfo() {
TopicName topicName = TopicName.get(getName());
- int backlogQuotaLimitInSecond = getBacklogQuota(BacklogQuotaType.message_age).getLimitTime();
- if (log.isDebugEnabled()) {
- log.debug("[{}] Time backlog quota = [{}]. Checking if exceeded.", topicName, backlogQuotaLimitInSecond);
- }
- // If backlog quota by time is not set
- if (backlogQuotaLimitInSecond <= 0) {
- return CompletableFuture.completedFuture(false);
+ if (!(ledger.getCursors() instanceof ManagedCursorContainer managedCursorContainer)) {
Review Comment:
Since the `ledger.getCursors()` exposes the API by an interface, shouldn’t let the implementation to decide the result?
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org