Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 of 3 tasks
lhotari opened this issue Sep 5, 2024 · 1 comment
Labels
type/bug The PR fixed a bug or issue reported a bug

Comments

@lhotari
Copy link
Member

lhotari commented Sep 5, 2024

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!
@lhotari
Copy link
Member Author

lhotari commented Sep 7, 2024

This is needed by "PIP-377: Automatic retry for failed acknowledgements", #23267 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The PR fixed a bug or issue reported a bug
Development

No branches or pull requests

1 participant