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

[draft] Fix setting cursor position on NonDurable subcription #23289

Closed
wants to merge 2 commits into from

Conversation

michalcukierman
Copy link

@michalcukierman michalcukierman commented Sep 11, 2024

PR is a draft and contains only failing test.

Motivation

After re-creating NonDurable subscription, the cursor was moved back by 1 position.
This should only happen when there is no startMessageId provided (see tests in the original PR).
Broker does not store batch index information, therefore it has to be provided while subscription initialization.

Before this fix, the backlog is incorrect, and the batch message later ignored by the client.

Modifications

Added startMessageId != null check, to ensure that the we only set relative position in a batch, when we have this information.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is already covered by existing tests, such as (please describe tests).

  • Broker tests where covering the original case. I've added one more test to cover this case.

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

Copy link

@michalcukierman Please add the following content to your PR description and select a checkbox:

- [ ] `doc` <!-- Your PR contains doc changes -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->

@michalcukierman michalcukierman marked this pull request as draft September 11, 2024 23:08
@github-actions github-actions bot added doc-not-needed Your PR changes do not impact docs and removed doc-label-missing labels Sep 11, 2024
@michalcukierman michalcukierman changed the title [fix][broker] Fix setting cursor position on NonDurable subcription [draft] Fix setting cursor position on NonDurable subcription Sep 12, 2024
@michalcukierman
Copy link
Author

Closing as the code was already copied in another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant