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: Race conditions and performance issues #237

Merged
merged 2 commits into from Sep 14, 2021
Merged

Commits on Sep 14, 2021

  1. fix: Race conditions and performance issues

    There are two main retrying_connection race conditions fixed here:
    
    1) Improper handling of cancelled write tasks can cause set_exception to be called when the task is already cancelled, which raises an InvalidStateError which is never caught by the existing code.
    2) There is a race where if reinitialize() is called after queues are cycled, meaning a poller from the old instance of the class can add a message to the new queues. This has been fixed by splitting the ConnectionReinitializer interface into "stop_processing" and "reinitialize" parts.
    
    Also fix other performance issues identified in profiles.
    dpcollins-google committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    bb4e0b6 View commit details
    Browse the repository at this point in the history
  2. fix: Race conditions and performance issues

    There are two main retrying_connection race conditions fixed here:
    
    1) Improper handling of cancelled write tasks can cause set_exception to be called when the task is already cancelled, which raises an InvalidStateError which is never caught by the existing code.
    2) There is a race where if reinitialize() is called after queues are cycled, meaning a poller from the old instance of the class can add a message to the new queues. This has been fixed by splitting the ConnectionReinitializer interface into "stop_processing" and "reinitialize" parts.
    
    Also fix other performance issues identified in profiles.
    dpcollins-google committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    c72eedb View commit details
    Browse the repository at this point in the history