Skip to content

Commit

Permalink
[fix] [broker] fix typo and useless local variable. (apache#22704)
Browse files Browse the repository at this point in the history
  • Loading branch information
thetumbled authored May 14, 2024
1 parent 1a7ada8 commit 9f1325a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ public ReplicatedSubscriptionsController(PersistentTopic topic, String localClus
}

public void receivedReplicatedSubscriptionMarker(Position position, int markerType, ByteBuf payload) {
MarkerType m = null;

try {
switch (markerType) {
case MarkerType.REPLICATED_SUBSCRIPTION_SNAPSHOT_REQUEST_VALUE:
Expand All @@ -105,7 +103,6 @@ public void receivedReplicatedSubscriptionMarker(Position position, int markerTy
default:
// Ignore
}

} catch (IOException e) {
log.warn("[{}] Failed to parse marker: {}", topic.getName(), e);
}
Expand Down Expand Up @@ -191,7 +188,7 @@ private void receiveSubscriptionUpdated(ReplicatedSubscriptionsUpdate update) {
if (sub != null) {
sub.acknowledgeMessage(Collections.singletonList(pos), AckType.Cumulative, Collections.emptyMap());
} else {
// Subscription doesn't exist. We need to force the creation of the subscription in this cluster, because
// Subscription doesn't exist. We need to force the creation of the subscription in this cluster.
log.info("[{}][{}] Creating subscription at {}:{} after receiving update from replicated subscription",
topic, update.getSubscriptionName(), updatedMessageId.getLedgerId(), pos);
topic.createSubscription(update.getSubscriptionName(), InitialPosition.Earliest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
* Tests replicated subscriptions (PIP-33)
*/
@Test(groups = "broker")
public class ReplicatorSubscriptionTest extends ReplicatorTestBase {
private static final Logger log = LoggerFactory.getLogger(ReplicatorSubscriptionTest.class);
public class ReplicatedSubscriptionTest extends ReplicatorTestBase {
private static final Logger log = LoggerFactory.getLogger(ReplicatedSubscriptionTest.class);

@Override
@BeforeClass(timeOut = 300000)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* Tests replicated subscriptions with transaction (PIP-33)
*/
@Test(groups = "broker")
public class ReplicatorSubscriptionWithTransactionTest extends ReplicatorSubscriptionTest {
public class ReplicatedSubscriptionWithTransactionTest extends ReplicatedSubscriptionTest {

@Override
@BeforeClass(timeOut = 300000)
Expand Down

0 comments on commit 9f1325a

Please sign in to comment.