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 connection, link and timer object leaks after EntityClose & fix inaccurate timer issues #88

Merged
merged 11 commits into from
Apr 5, 2017

Conversation

SreeramGarlapati
Copy link
Contributor

  • fixes stuck behaviors in Sender & Receiver
  • MsgReceiver should update the pendingReceive queue before enqueing work to ReactorDispatcher
  • fix receiver when prefetch queue is full
  • Fix Sender & Receiver dormant links after close
  • move messagesender timer out-of reactorDispatcher queue
  • handle scenarios where an underlying linkOpen is pending and user invokes receiver.close()
  • fix the close paths for send - for dormant links
  • Move link open close timers out of ReactorDispatcher
  • Clear pendingSends & Receives in case of CloseTimeout
  • Don't open amqpconnection if MsgFactory is in Closed() state

* fixes stuck behaviors in Sender & Receiver
* MsgReceiver should update the pendingReceive queue before enqueing work to ReactorDispatcher
* fix receiver when prefetch queue is full
* Fix Sender & Receiver dormant links after close
* move messagesender timer out-of reactorDispatcher queue
* handle scenarios where an underlying linkOpen is pending and user invokes receiver.close()
* fix the close paths for send - for dormant links
* Move link open close timers out of ReactorDispatcher
* Clear pendingSends & Receives in case of CloseTimeout
* Don't open amqpconnection if MsgFactory is in Closed() state
@msftclas
Copy link

@SreeramGarlapati,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

@SreeramGarlapati
Copy link
Contributor Author

@sjkwak @JamesBirdsall - I redirected our stress runs to run against this branch - lets wait on the stress results to merge this PR...

@SreeramGarlapati SreeramGarlapati changed the title Fix connection, link and timer object leaks after EntityClose Fix connection, link and timer object leaks after EntityClose & fix inaccurate timer issues Mar 30, 2017
@@ -210,6 +216,8 @@ public void onOpenComplete(Exception exception)
{
this.open.complete(this);
this.openConnection.complete(this.connection);
if (this.getIsClosingOrClosed())
this.connection.close();
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we also stop a reactor in case we close a connection?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we should & We already Do.
"Close-Connection" is a reactor event - which will need to flown to service. Once, client gets close ack from service, reactor will invoke onError(null) - which is equivalent to remoteClose - & in the OnError(null) - we stop the reactor.


In reply to: 109542770 [](ancestors = 109542770)

@sjkwak sjkwak merged commit 0223d22 into Azure:dev Apr 5, 2017
@SreeramGarlapati SreeramGarlapati deleted the sg.fixleaks branch April 5, 2017 17:00
@SreeramGarlapati SreeramGarlapati added this to the 0.13.1 milestone Apr 5, 2017
SreeramGarlapati added a commit to SreeramGarlapati/azure-event-hubs-java that referenced this pull request Apr 6, 2017
…naccurate timer issues (Azure#88)

* Fix connection, link and timer object leaks after EntityClose

* fixes stuck behaviors in Sender & Receiver
* MsgReceiver should update the pendingReceive queue before enqueing work to ReactorDispatcher
* fix receiver when prefetch queue is full
* Fix Sender & Receiver dormant links after close
* move messagesender timer out-of reactorDispatcher queue
* handle scenarios where an underlying linkOpen is pending and user invokes receiver.close()
* fix the close paths for send - for dormant links
* Move link open close timers out of ReactorDispatcher
* Clear pendingSends & Receives in case of CloseTimeout
* Don't open amqpconnection if MsgFactory is in Closed() state

* Fix sender stuck issue due to a missing not(!) in if check

* Fix dead links registered for ConnectionHandler errors

* add manual test which can be used to test intermittent connection scanarios effectively

* minor refactor

* don't proactively throw sendlink error on token renewal failure

* nit fixes

* code refactor

* refactoring messagesender

* Update minor release

* minor refactor
SwayGom pushed a commit that referenced this pull request May 17, 2024
…naccurate timer issues (#88)

* Fix connection, link and timer object leaks after EntityClose

* fixes stuck behaviors in Sender & Receiver
* MsgReceiver should update the pendingReceive queue before enqueing work to ReactorDispatcher
* fix receiver when prefetch queue is full
* Fix Sender & Receiver dormant links after close
* move messagesender timer out-of reactorDispatcher queue
* handle scenarios where an underlying linkOpen is pending and user invokes receiver.close()
* fix the close paths for send - for dormant links
* Move link open close timers out of ReactorDispatcher
* Clear pendingSends & Receives in case of CloseTimeout
* Don't open amqpconnection if MsgFactory is in Closed() state

* Fix sender stuck issue due to a missing not(!) in if check

* Fix dead links registered for ConnectionHandler errors

* add manual test which can be used to test intermittent connection scanarios effectively

* minor refactor

* don't proactively throw sendlink error on token renewal failure

* nit fixes

* code refactor

* refactoring messagesender

* Update minor release

* minor refactor
SwayGom pushed a commit that referenced this pull request May 17, 2024
…naccurate timer issues (#88)

* Fix connection, link and timer object leaks after EntityClose

* fixes stuck behaviors in Sender & Receiver
* MsgReceiver should update the pendingReceive queue before enqueing work to ReactorDispatcher
* fix receiver when prefetch queue is full
* Fix Sender & Receiver dormant links after close
* move messagesender timer out-of reactorDispatcher queue
* handle scenarios where an underlying linkOpen is pending and user invokes receiver.close()
* fix the close paths for send - for dormant links
* Move link open close timers out of ReactorDispatcher
* Clear pendingSends & Receives in case of CloseTimeout
* Don't open amqpconnection if MsgFactory is in Closed() state

* Fix sender stuck issue due to a missing not(!) in if check

* Fix dead links registered for ConnectionHandler errors

* add manual test which can be used to test intermittent connection scanarios effectively

* minor refactor

* don't proactively throw sendlink error on token renewal failure

* nit fixes

* code refactor

* refactoring messagesender

* Update minor release

* minor refactor
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.

3 participants