Skip to content

Conversation

@merlimat
Copy link
Contributor

This reverts #6364 commit 336e971.

Motivation

There are few issues that were introduced in that commit:

  1. If a new replication cursor is create after the topic is loaded, that cursor might be missing some of the latest messages
  2. Many places in the code are assuming that the cursor is always present on the replicator and are failing with NPE when the cursor is not created (or fails to get created).

One such example is that metrics will stop getting reported because of an exception:

ERROR org.apache.pulsar.broker.stats.prometheus.PrometheusMetricsServlet - Failed to generate prometheus stats 
java.lang.NullPointerException: null                                                                                                                
         at org.apache.pulsar.broker.service.persistent.PersistentReplicator.getStats(PersistentReplicator.java:676) ~[org.apache.pulsar-pulsar-broker-2.7.
         at org.apache.pulsar.broker.service.persistent.PersistentTopic.lambda$getStats$45(PersistentTopic.java:1624) ~[org.apache.pulsar-pulsar-broker-2.7

@merlimat merlimat merged commit e486492 into apache:master May 22, 2021
@merlimat merlimat deleted the fix-replicator-npe branch May 22, 2021 17:14
yangl pushed a commit to yangl/pulsar that referenced this pull request Jun 23, 2021
codelipenghui pushed a commit that referenced this pull request Jun 26, 2021
…tors (#6364)" (#10674)

This reverts commit 336e971.

(cherry picked from commit e486492)
@codelipenghui codelipenghui added the cherry-picked/branch-2.7 Archived: 2.7 is end of life label Jun 26, 2021
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/branch-2.7 Archived: 2.7 is end of life release/2.7.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants