-
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] Update send operation to include initialization #4319
Merged
Merged
Changes from 22 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
260b0e6
[Event Hubs] Introduce timeoutInMs on RetryOptions (#4239)
ramya0820 c74f5e4
Merge branch 'master' of https://github.com/ramya0820/azure-sdk-for-js
00016cb
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-js
ramya0820 4916ce3
Move init() to within sendOperation()
ramya0820 af5d8c4
Update operation timeout error in send() to throw the newly defined O…
ramya0820 a66272a
Update log message
ramya0820 a74824d
Fix operation timeout handling
ramya0820 1607ddd
Merge from master
ramya0820 0631ceb
Fix timer clearance
ramya0820 60fa5ae
Simplify promise handling using async await
ramya0820 3168339
Fix few merge errors
ramya0820 b449cef
Simplify changes
ramya0820 e0c8e92
Undo prettier changes, fix merge
ramya0820 85c2ffc
Nit: whitespaces
ramya0820 1212ae7
Fix code move around and error name
ramya0820 f28c566
Fix timer handling
ramya0820 66127ee
Refactor to simplify callback definitions
ramya0820 0e54d61
Remove jitter
ramya0820 3ec9c9d
Update try catch scope
ramya0820 d9d38a3
Fix timer clearance
ramya0820 f85e112
Remove comment
ramya0820 f5b54eb
Return reject
ramya0820 ddb6195
Fix build error
ramya0820 6e6ef92
Merge branch 'master' into issue-2835-p1
ramya0820 eaaf17e
Revert refactoring
ramya0820 78c0b4a
Merge branch 'issue-2835-p1' of https://github.com/ramya0820/azure-sd…
ramya0820 f6e7271
Handle abort around init
ramya0820 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Due to the re-arrangement of the timer, if
if (abortSignal && abortSignal.aborted)
below returns true, then we end up returning a rejected promise (which is right) without clearing the timer.Please consider keeping the previous order of the callbacks/helper-functions and only adding the link creation part at the right place
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 ordering in the recent commit of eaaf17e is better, but still needs work.
In the current setup, if the abort signal is fired when the async process of
init()
is in progress, then the promise is being rejected only afterinit()
is complete. This is becauseinit()
is being called before the event handler forabort
event was added.Please make the below changes
init()
failsThere 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.
#4322 (comment) thread specifically clarifies about abort during init().
This scenario if we want to address would then need to apply for the managementRequest as well correct? Or did we specifically exclude this because of complexity involved? (In not having access to removeListeners() on sender link from the SDK?) It just feels like UX is not consistent in both cases.
Okay to implement the optimization and new corner cases from this.
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 scenario applies to managementRequest as well i.e. the scenario of abort signal being fired when the async process of init() is in progress.
I have updated the comment thread for managementRequest. Please see https://github.com/Azure/azure-sdk-for-js/pull/4322/files#r305599979