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

fix discard of packets so the next packet to expect is updated correctly #302

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

sebastianburckhardt
Copy link
Member

Fixes a bug where discarding events from other taskhubs causes the expected sequence number to be wrong (not updated to reflect the discarded packets) which then triggers spurious errors when receiving more events.

This code is not tested yet.

@sebastianburckhardt sebastianburckhardt marked this pull request as draft August 30, 2023 20:02
Copy link
Member

@davidmrdavid davidmrdavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

broadly makes sense, but have a quick question:

Comment on lines +436 to +440
// we need to update the next expected seqno even if the iterator returns nothing, since it may have discarded some packets.
// iterators do not support ref arguments, so we use a simple wrapper class to work around this limitation
MutableLong nextPacketToReceive = new MutableLong() { Value = current.NextPacketToReceive.seqNo };

await foreach ((EventData eventData, PartitionEvent[] events, long seqNo) in this.blobBatchReceiver.ReceiveEventsAsync(this.taskHubGuid, packets, current.ErrorHandler.Token, nextPacketToReceive))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also call ReceiveEventsAsync in LoadMonitorProcessor and EventHubsTransport. What is the reason why we don't need to use update the expected seqno in there?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those two are used by clients and the load monitor, respectively. The latter do not care about the order or about duplication of received events, so they are not tracking the sequence numbers.

@sebastianburckhardt sebastianburckhardt added this to the 1.4.1 milestone Sep 27, 2023
@sebastianburckhardt sebastianburckhardt marked this pull request as ready for review September 27, 2023 14:28
@sebastianburckhardt sebastianburckhardt merged commit 2ae01f8 into dev Oct 10, 2023
sebastianburckhardt added a commit that referenced this pull request Oct 11, 2023
sebastianburckhardt added a commit that referenced this pull request Oct 17, 2023
sebastianburckhardt added a commit that referenced this pull request Oct 23, 2023
* Update CreationRequestReceived.cs

* remove the faster-alternate data store and fix broken deserialization. (#308)

* fix and instrument commitlog serialization and deserialization. (#305)

* fix discard of packets so the next packet to expect is updated correctly (#302)

* New EventHubs performance tests (#178)

* rebase, and remove changes to scale monitor

* add hello cities test that prints the history of a nested orchestration

* implement a watchdog that terminates CompletePending quickly if it hangs (#318)

* add unique id to scale monitor constructor (#316)

* fix bugs from PR #302 (#315)

* fix cache size reporting (#321)

* added a comment

* update durable task package references to 2.15.1 and 2.12.0 (#317)

* update DT and DF package references

* update to latest

* sync dev w/ main (#324)

* Update GH automation (#303)

* initial commit (#290)

* Revert "initial commit (#290)" (#314)

This reverts commit 3a2d193.

* Bump Azure.Identity from 1.7.0 to 1.10.2 in /samples/TokenCredentialDTFx (#323)

Bumps [Azure.Identity](https://github.com/Azure/azure-sdk-for-net) from 1.7.0 to 1.10.2.
- [Release notes](https://github.com/Azure/azure-sdk-for-net/releases)
- [Commits](Azure/azure-sdk-for-net@Azure.Identity_1.7.0...Azure.Identity_1.10.2)

---
updated-dependencies:
- dependency-name: Azure.Identity
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Terminate partition when FASTER refuses to checkpoint for over a minute (#301)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Varshitha Bachu <vabachu@microsoft.com>
Co-authored-by: Sebastian Burckhardt <sburckha@microsoft.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Sebastian Burckhardt <sburckha@microsoft.com>
Co-authored-by: David Justo <david.justo.1996@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants