forked from fl00r/go-tarantool-1.6
-
Notifications
You must be signed in to change notification settings - Fork 60
queue: fix flaky Example_connectionPool #222
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
Merged
Merged
Conversation
This file contains hidden or 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
DifferentialOrange
approved these changes
Oct 10, 2022
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.
LGTM after rebasing on master
c2fabab
to
fbed220
Compare
vr009
approved these changes
Oct 31, 2022
The patch fixes the return an invalid task object from queue.Take(). It may happen if an encoded task data has a nil value [1]. After the fix queue.Take() returns a nil value in the case. 1. https://github.com/msgpack/msgpack/blob/master/spec.md#nil-format
We get a nil task if a ConnectionPool does not yet detect master->replica role switch. We need to add additional check for the case to make the test output deterministic.
fbed220
to
24a1c4e
Compare
It's better to wait for a discovered event instead of deactivated to handle finish of a role update.
Merged
oleg-jukovec
added a commit
that referenced
this pull request
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 pull request
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 pull request
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 pull request
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
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.
The flaky test output:
We get a nil task if a ConnectionPool does not yet detect master->replica role switch. We need to add additional check for the case to make the test output deterministic.