Skip to content

Messages are skipped (disappeared) when using Rollup and multi-filter consumers #8571

Description

@yaarasat

Observed behavior

Messages are getting disappeared. After long investigatin it was found out that this is happening when using rollups. To be more specific, for multiple filter subjects and having rollup, msgs are getting lost, It seems that nuts move the cursor to the last msg that was purged. and if there were msgs for other filter that were not purged, they are getting skipped since the cursor was moved after them.
At the end pending and redelivery counts become zero.

Expected behavior

When using rollup with multiple filters, only msgs that were supposed to be deleted are getting deleted. All other msgs should be consumed.

Server and client version

•  nats-server/v2 v2.14.3
•  nats.go v1.51.0

Host environment

No response

Steps to reproduce

  1. Create a rollup-enabled stream for events.> .
    2. Create an explicit-ACK consumer with filters events.host and events.periodic , and max_ack_pending=1 .
    3. Publish events.host message A and hold its ACK.
    4. Publish events.host message B.
    5. Publish events.periodic with Nats-Rollup: sub .
    6. ACK message A.

Message B is skipped, the Periodic message is delivered, and the consumer reports no pending or redelivered messages.

Submission acknowledgment

  • I am a human being writing in my own words and not an AI agent. I will not use an AI agent to communicate on my behalf in this issue, either directly or via copy-paste.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    defectSuspected defect such as a bug or regression

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions