-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Event Hubs] Prefetch events #26065
[Event Hubs] Prefetch events #26065
Changes from all commits
ea19eab
5e2306d
8161769
19c8dd3
89a2879
9314b6a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,10 +123,12 @@ testWithServiceTypes((serviceVersion) => { | |
await receiver1.connect({ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how is this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not related. This PR improves performance by prefetching events so chances are the received batch size will be larger than before. We still don't want to wait until we receive Now there is a question for you, how can we analyze the performance characteristic of this change? More specifically, can we show the average/median batch size before and after the change? can we show how often the user callback was called per minute or second? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, these are good metrics to track, how often the user callback is called is already being tracked in the perf test. Let's work on testing this, so we don't miss anything obvious. 🙂 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here is a stress test run for the checkpoint store test .. @deyaaeldeen and I were discussing... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks a lot @HarshaNalluru! Also, the performance analysis shows that the size median of the received batches increased as well as max and mean throughput. |
||
abortSignal: undefined, | ||
timeoutInMs: 60000, | ||
prefetchCount: 1, | ||
}); | ||
await receiver2.connect({ | ||
abortSignal: undefined, | ||
timeoutInMs: 60000, | ||
prefetchCount: 1, | ||
}); | ||
|
||
// We are going to override sender1's close method so that it also invokes receiver2's close method. | ||
|
@@ -183,10 +185,12 @@ testWithServiceTypes((serviceVersion) => { | |
await receiver1.connect({ | ||
abortSignal: undefined, | ||
timeoutInMs: 60000, | ||
prefetchCount: 1, | ||
}); | ||
await receiver2.connect({ | ||
abortSignal: undefined, | ||
timeoutInMs: 60000, | ||
prefetchCount: 1, | ||
}); | ||
|
||
// We are going to override sender1's close method so that it also invokes receiver2's close method. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens when the user closes the consumer/subscription as soon as the prefetch receives the events?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this would be a problem in service-bus since the delivery count would be updated, probably have no effects in event-hubs, would like to understand more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The receiver will be discarded including the prefetched list of events. This is ok in Event Hubs because when you receive from a partition, you start reading from a specific event position and not necessarily from the last event fetched.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If no event position is specified, the reading will start from the earliest event in the partition.