Skip to content

[Bug] When ack receipts are enabled, no response is sent to the client if the topic has been unloaded or is being transferred #23261

@lhotari

Description

@lhotari

Search before asking

  • I searched in the issues and found nothing similar.

Read release policy

  • I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.

Version

any released version, master branch

Minimal reproduce step

This was found when analysing the source code, so no reproducer yet.
A test application that consumes and acks messages while a topic is being frequently unloaded will reproduce this issue.

What did you expect to see?

When ack receipt is enabled, the broker should respond with a failure when it discards an ack.

What did you see instead?

When the consumer isn't found, it's silently discarded. There's debug logging, but no ack receipt response logic to respond with an error:

} else {
if (log.isDebugEnabled()) {
log.debug("Consumer future is not complete(not complete or error), but received command ack. so discard"
+ " this command. consumerId: {}, cnx: {}, messageIdCount: {}", ack.getConsumerId(),
this.toString(), ack.getMessageIdsCount());
}
}

and
var pulsar = getBrokerService().getPulsar();
var ignoredAckCount = ack.getMessageIdsCount();
var ignoredAckTotalCount = ExtensibleLoadManagerImpl.get(pulsar).getIgnoredAckCount().
addAndGet(ignoredAckCount);
if (log.isDebugEnabled()) {
log.debug("[{}] [{}] Ignoring {} message acks during topic transfer. Total ignored ack count: {}",
subscription, consumerId, ignoredAckCount, ignoredAckTotalCount);
}
return;

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugThe PR fixed a bug or issue reported a bug

    Type

    No type

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions