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

Support user-defined callbacks for connection_pool events #178

Closed
Tracked by #179
0x501D opened this issue May 26, 2022 · 0 comments · Fixed by #210
Closed
Tracked by #179

Support user-defined callbacks for connection_pool events #178

0x501D opened this issue May 26, 2022 · 0 comments · Fixed by #210
Assignees

Comments

@0x501D
Copy link
Member

0x501D commented May 26, 2022

In connection_pool we have two types of events:

  • reconnect after connection loss
  • role changed (master-replica switched)

It would be nice add ability for user to pass custom callbacks for this events.

@LeonidVas LeonidVas added the 5sp label May 26, 2022
@kyukhin kyukhin added the teamE label Jun 3, 2022
@oleg-jukovec oleg-jukovec self-assigned this Aug 12, 2022
oleg-jukovec added a commit that referenced this issue Aug 22, 2022
ConnectionListener provides an observer semantics for components interested
in knowing the role changes of connections in a ConnectionPool.

Closes #178
oleg-jukovec added a commit that referenced this issue Aug 24, 2022
ConnectionListener provides an observer semantics for components interested
in knowing the role changes of connections in a ConnectionPool.

Closes #178
oleg-jukovec added a commit that referenced this issue Aug 26, 2022
ConnectionListener provides an observer semantics for components
interested in knowing the role changes of connections in a
ConnectionPool.

We have to take into account that user callbacks can take an
indefinite amount of time. The simplest solution is to process each
connection in a separate goroutine. This should not affect to
performance because most of the time these goroutines are blocked.

Closes #178
oleg-jukovec added a commit that referenced this issue Aug 26, 2022
ConnectionListener provides an observer semantics for components
interested in knowing the role changes of connections in a
ConnectionPool.

We have to take into account that user callbacks can take an
indefinite amount of time. The simplest solution is to process each
connection in a separate goroutine. This should not affect to
performance because most of the time these goroutines are blocked.

Closes #178
oleg-jukovec added a commit that referenced this issue Aug 26, 2022
ConnectionListener provides an observer semantics for components
interested in knowing the role changes of connections in a
ConnectionPool.

We have to take into account that user callbacks can take an
indefinite amount of time. The simplest solution is to process each
connection in a separate goroutine. This should not affect to
performance because most of the time these goroutines are blocked.

Closes #178
oleg-jukovec added a commit that referenced this issue Aug 28, 2022
ConnectionListener provides an observer semantics for components
interested in knowing the role changes of connections in a
ConnectionPool.

We have to take into account that user callbacks can take an
indefinite amount of time. The simplest solution is to process each
connection in a separate goroutine. This should not affect to
performance because most of the time these goroutines are blocked.

Closes #178
oleg-jukovec added a commit that referenced this issue Aug 29, 2022
ConnectionListener provides an observer semantics for components
interested in knowing the role changes of connections in a
ConnectionPool.

We have to take into account that user callbacks can take an
indefinite amount of time. The simplest solution is to process each
connection in a separate goroutine. This should not affect to
performance because most of the time these goroutines are blocked.

Closes #178
oleg-jukovec added a commit that referenced this issue Aug 30, 2022
ConnectionObserver provides an observer semantics for components
interested in knowing changes of connections in a ConnectionPool.

We have to take into account that user callbacks can take an
indefinite amount of time. The simplest solution is to process each
connection in a separate goroutine. This should not affect to
performance because most of the time these goroutines are blocked.

Closes #178
oleg-jukovec added a commit that referenced this issue Aug 30, 2022
ConnectionHandler provides callbacks for components interested
in handling changes of connections in a ConnectionPool.

We have to take into account that user callbacks can take an
indefinite amount of time. The simplest solution is to process each
connection in a separate goroutine. This should not affect to
performance because most of the time these goroutines are blocked.

Closes #178
oleg-jukovec added a commit that referenced this issue Sep 1, 2022
ConnectionHandler provides callbacks for components interested
in handling changes of connections in a ConnectionPool.

We have to take into account that user callbacks can take an
indefinite amount of time. The simplest solution is to process each
connection in a separate goroutine. This should not affect to
performance because most of the time these goroutines are blocked.

Closes #178
oleg-jukovec added a commit that referenced this issue Sep 2, 2022
ConnectionHandler provides callbacks for components interested
in handling changes of connections in a ConnectionPool.

We have to take into account that user callbacks can take an
indefinite amount of time. The simplest solution is to process each
connection in a separate goroutine. This should not affect to
performance because most of the time these goroutines are blocked.

Closes #178
oleg-jukovec added a commit that referenced this issue Sep 5, 2022
ConnectionHandler provides callbacks for components interested
in handling changes of connections in a ConnectionPool.

We have to take into account that user callbacks can take an
indefinite amount of time. The simplest solution is to process each
connection in a separate goroutine. This should not affect to
performance because most of the time these goroutines are blocked.

Closes #178
oleg-jukovec added a commit that referenced this issue Sep 7, 2022
ConnectionHandler provides callbacks for components interested
in handling changes of connections in a ConnectionPool.

We have to take into account that user callbacks can take an
indefinite amount of time. The simplest solution is to process each
connection in a separate goroutine. This should not affect to
performance because most of the time these goroutines are blocked.

Closes #178
oleg-jukovec added a commit that referenced this issue Oct 4, 2022
Overview

    The release adds support for the latest version of the
    queue package with master-replica switching.

Breaking changes

    There are no breaking changes in the release.

New features

    Support the queue 1.2.1 (#177).

    ConnectionHandler interface for handling changes of connections in
    ConnectionPool (#178)

    Execute, ExecuteTyped and ExecuteAsync methods to
    ConnectionPool (#176)

    ConnectorAdapter type to use ConnectionPool as Connector
    interface (#176)

    An example how to use queue and connection_pool subpackages
    together (#176)

Bugfixes

    Mode type description in the connection_pool subpackage (#208)

    Missed Role type constants in the connection_pool subpackage (#208)

    ConnectionPool does not close UnknownRole connections (#208)

    Segmentation faults in ConnectionPool requests after
    disconnect (#208)

    Addresses in ConnectionPool may be changed from an external
    code (#208)

    ConnectionPool recreates connections too often (#208)

    A connection is still opened after ConnectionPool.Close() (#208)

    Future.GetTyped() after Future.Get() does not decode response
    correctly (#213)

    Decimal package use a test function GetNumberLength instead of a
    package-level function getNumberLength (#219)

    Datetime location after encode + decode is unequal (#217)
oleg-jukovec added a commit that referenced this issue Oct 4, 2022
Overview

    The release adds support for the latest version of the
    queue package with master-replica switching.

Breaking changes

    There are no breaking changes in the release.

New features

    Support the queue 1.2.1 (#177).

    ConnectionHandler interface for handling changes of connections in
    ConnectionPool (#178).

    Execute, ExecuteTyped and ExecuteAsync methods to
    ConnectionPool (#176).

    ConnectorAdapter type to use ConnectionPool as Connector
    interface (#176).

    An example how to use queue and connection_pool subpackages
    together (#176).

Bugfixes

    Mode type description in the connection_pool subpackage (#208).

    Missed Role type constants in the connection_pool
    subpackage (#208).

    ConnectionPool does not close UnknownRole connections (#208).

    Segmentation faults in ConnectionPool requests after
    disconnect (#208).

    Addresses in ConnectionPool may be changed from an external
    code (#208).

    ConnectionPool recreates connections too often (#208).

    A connection is still opened after ConnectionPool.Close() (#208).

    Future.GetTyped() after Future.Get() does not decode response
    correctly (#213).

    Decimal package use a test function GetNumberLength instead of a
    package-level function getNumberLength (#219).

    Datetime location after encode + decode is unequal (#217).
oleg-jukovec added a commit that referenced this issue Oct 5, 2022
Overview

    The release adds support for the latest version of the
    queue package with master-replica switching.

Breaking changes

    There are no breaking changes in the release.

New features

    Support the queue 1.2.1 (#177).

    ConnectionHandler interface for handling changes of connections in
    ConnectionPool (#178).

    Execute, ExecuteTyped and ExecuteAsync methods to
    ConnectionPool (#176).

    ConnectorAdapter type to use ConnectionPool as Connector
    interface (#176).

    An example how to use queue and connection_pool subpackages
    together (#176).

Bugfixes

    Mode type description in the connection_pool subpackage (#208).

    Missed Role type constants in the connection_pool
    subpackage (#208).

    ConnectionPool does not close UnknownRole connections (#208).

    Segmentation faults in ConnectionPool requests after
    disconnect (#208).

    Addresses in ConnectionPool may be changed from an external
    code (#208).

    ConnectionPool recreates connections too often (#208).

    A connection is still opened after ConnectionPool.Close() (#208).

    Future.GetTyped() after Future.Get() does not decode response
    correctly (#213).

    Decimal package use a test function GetNumberLength instead of a
    package-level function getNumberLength (#219).

    Datetime location after encode + decode is unequal (#217).
oleg-jukovec added a commit that referenced this issue Oct 31, 2022
Overview

    The release adds support for the latest version of the
    queue package with master-replica switching.

Breaking changes

    There are no breaking changes in the release.

New features

    Support the queue 1.2.1 (#177).

    ConnectionHandler interface for handling changes of connections in
    ConnectionPool (#178).

    Execute, ExecuteTyped and ExecuteAsync methods to
    ConnectionPool (#176).

    ConnectorAdapter type to use ConnectionPool as Connector
    interface (#176).

    An example how to use queue and connection_pool subpackages
    together (#176).

Bugfixes

    Mode type description in the connection_pool subpackage (#208).

    Missed Role type constants in the connection_pool
    subpackage (#208).

    ConnectionPool does not close UnknownRole connections (#208).

    Segmentation faults in ConnectionPool requests after
    disconnect (#208).

    Addresses in ConnectionPool may be changed from an external
    code (#208).

    ConnectionPool recreates connections too often (#208).

    A connection is still opened after ConnectionPool.Close() (#208).

    Future.GetTyped() after Future.Get() does not decode response
    correctly (#213).

    Decimal package use a test function GetNumberLength instead of a
    package-level function getNumberLength (#219).

    Datetime location after encode + decode is unequal (#217).

    Wrong interval arithmetic with timezones (#221).

    Invalid MsgPack if STREAM_ID > 127 (#224).

    queue.Take() returns an invalid task (#222).
oleg-jukovec added a commit that referenced this issue Oct 31, 2022
Overview

    The release adds support for the latest version of the
    queue package with master-replica switching.

Breaking changes

    There are no breaking changes in the release.

New features

    Support the queue 1.2.1 (#177).

    ConnectionHandler interface for handling changes of connections in
    ConnectionPool (#178).

    Execute, ExecuteTyped and ExecuteAsync methods to
    ConnectionPool (#176).

    ConnectorAdapter type to use ConnectionPool as Connector
    interface (#176).

    An example how to use queue and connection_pool subpackages
    together (#176).

Bugfixes

    Mode type description in the connection_pool subpackage (#208).

    Missed Role type constants in the connection_pool
    subpackage (#208).

    ConnectionPool does not close UnknownRole connections (#208).

    Segmentation faults in ConnectionPool requests after
    disconnect (#208).

    Addresses in ConnectionPool may be changed from an external
    code (#208).

    ConnectionPool recreates connections too often (#208).

    A connection is still opened after ConnectionPool.Close() (#208).

    Future.GetTyped() after Future.Get() does not decode response
    correctly (#213).

    Decimal package use a test function GetNumberLength instead of a
    package-level function getNumberLength (#219).

    Datetime location after encode + decode is unequal (#217).

    Wrong interval arithmetic with timezones (#221).

    Invalid MsgPack if STREAM_ID > 127 (#224).

    queue.Take() returns an invalid task (#222).
oleg-jukovec added a commit that referenced this issue Nov 2, 2022
Overview

    The release adds support for the latest version of the
    queue package with master-replica switching.

Breaking changes

    There are no breaking changes in the release.

New features

    Support the queue 1.2.1 (#177).

    ConnectionHandler interface for handling changes of connections in
    ConnectionPool (#178).

    Execute, ExecuteTyped and ExecuteAsync methods to
    ConnectionPool (#176).

    ConnectorAdapter type to use ConnectionPool as Connector
    interface (#176).

    An example how to use queue and connection_pool subpackages
    together (#176).

Bugfixes

    Mode type description in the connection_pool subpackage (#208).

    Missed Role type constants in the connection_pool
    subpackage (#208).

    ConnectionPool does not close UnknownRole connections (#208).

    Segmentation faults in ConnectionPool requests after
    disconnect (#208).

    Addresses in ConnectionPool may be changed from an external
    code (#208).

    ConnectionPool recreates connections too often (#208).

    A connection is still opened after ConnectionPool.Close() (#208).

    Future.GetTyped() after Future.Get() does not decode response
    correctly (#213).

    Decimal package use a test function GetNumberLength instead of a
    package-level function getNumberLength (#219).

    Datetime location after encode + decode is unequal (#217).

    Wrong interval arithmetic with timezones (#221).

    Invalid MsgPack if STREAM_ID > 127 (#224).

    queue.Take() returns an invalid task (#222).
oleg-jukovec added a commit that referenced this issue Nov 2, 2022
Overview

    The release adds support for the latest version of the
    queue package with master-replica switching.

Breaking changes

    There are no breaking changes in the release.

New features

    Support the queue 1.2.1 (#177).

    ConnectionHandler interface for handling changes of connections in
    ConnectionPool (#178).

    Execute, ExecuteTyped and ExecuteAsync methods to
    ConnectionPool (#176).

    ConnectorAdapter type to use ConnectionPool as Connector
    interface (#176).

    An example how to use queue and connection_pool subpackages
    together (#176).

Bugfixes

    Mode type description in the connection_pool subpackage (#208).

    Missed Role type constants in the connection_pool
    subpackage (#208).

    ConnectionPool does not close UnknownRole connections (#208).

    Segmentation faults in ConnectionPool requests after
    disconnect (#208).

    Addresses in ConnectionPool may be changed from an external
    code (#208).

    ConnectionPool recreates connections too often (#208).

    A connection is still opened after ConnectionPool.Close() (#208).

    Future.GetTyped() after Future.Get() does not decode response
    correctly (#213).

    Decimal package use a test function GetNumberLength instead of a
    package-level function getNumberLength (#219).

    Datetime location after encode + decode is unequal (#217).

    Wrong interval arithmetic with timezones (#221).

    Invalid MsgPack if STREAM_ID > 127 (#224).

    queue.Take() returns an invalid task (#222).
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 a pull request may close this issue.

4 participants