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

Make queue works with connection_pool #176

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

Make queue works with connection_pool #176

0x501D opened this issue May 25, 2022 · 0 comments · Fixed by #212
Assignees

Comments

@0x501D
Copy link
Member

0x501D commented May 25, 2022

For now we cannot work with queue on replicaset setups:

package main

import (
    "fmt"
    "time"

    "github.com/tarantool/go-tarantool"
    "github.com/tarantool/go-tarantool/connection_pool"
    "github.com/tarantool/go-tarantool/queue"
)

func main() {
    replicaset, err := connection_pool.Connect([]string{"127.0.0.1:3301", "127.0.0.1:3302"}, tarantool.Opts{
        Timeout: 500 * time.Millisecond,
    })
    if err != nil {
        fmt.Printf("error in connect is %v", err)
    }
    
    defer replicaset.Close()
    
    q := queue.New(replicaset, "test_tube_tmp2")
    stat, err := q.Statistic()
    fmt.Println(stat)
}

This code will fails:

$ go run test.go
# command-line-arguments
./test.go:25:17: cannot use replicaset (variable of type *connection_pool.ConnectionPool) as type tarantool.Connector in argument to queue.New:
	*connection_pool.ConnectionPool does not implement tarantool.Connector (wrong type for Call method)
		have Call(functionName string, args interface{}, userMode connection_pool.Mode) (resp *tarantool.Response, err error)
		want Call(functionName string, args interface{}) (resp *tarantool.Response, err error)
@LeonidVas LeonidVas added the 2sp label May 26, 2022
@kyukhin kyukhin added the teamE label Jun 3, 2022
@oleg-jukovec oleg-jukovec self-assigned this Aug 22, 2022
oleg-jukovec added a commit that referenced this issue Aug 25, 2022
The patch adds missed Execute, ExecuteTyped and ExecuteAsync methods
to the ConnectionPool type.

Part of #176
oleg-jukovec added a commit that referenced this issue Aug 25, 2022
ConnectorAdapter allows to use ConnectionPool as Connector. All
requests to a pool will be executed in a specified mode.

Part of #176
oleg-jukovec added a commit that referenced this issue Aug 25, 2022
The patch adds missed Execute, ExecuteTyped and ExecuteAsync methods
to the ConnectionPool type.

Part of #176
oleg-jukovec added a commit that referenced this issue Aug 25, 2022
ConnectorAdapter allows to use ConnectionPool as Connector. All
requests to a pool will be executed in a specified mode.

Part of #176
oleg-jukovec added a commit that referenced this issue Aug 25, 2022
The example demonstrates how to use the queue package with
the connection_pool package.

Closes #176
oleg-jukovec added a commit that referenced this issue Aug 25, 2022
The example demonstrates how to use the queue package with
the connection_pool package.

Closes #176
oleg-jukovec added a commit that referenced this issue Aug 26, 2022
The patch adds missed Execute, ExecuteTyped and ExecuteAsync methods
to the ConnectionPool type.

Part of #176
oleg-jukovec added a commit that referenced this issue Aug 26, 2022
ConnectorAdapter allows to use ConnectionPool as Connector. All
requests to a pool will be executed in a specified mode.

Part of #176
oleg-jukovec added a commit that referenced this issue Aug 26, 2022
The example demonstrates how to use the queue package with
the connection_pool package.

Closes #176
oleg-jukovec added a commit that referenced this issue Aug 26, 2022
The example demonstrates how to use the queue package with
the connection_pool package.

Closes #176
oleg-jukovec added a commit that referenced this issue Sep 7, 2022
The patch adds missed Execute, ExecuteTyped and ExecuteAsync methods
to the ConnectionPool type.

Part of #176
oleg-jukovec added a commit that referenced this issue Sep 7, 2022
ConnectorAdapter allows to use ConnectionPool as Connector. All
requests to a pool will be executed in a specified mode.

Part of #176
oleg-jukovec added a commit that referenced this issue Sep 7, 2022
The example demonstrates how to use the queue package with
the connection_pool package.

Closes #176
oleg-jukovec added a commit that referenced this issue Sep 12, 2022
It fixes queue.cfg({in_replicaset = true}) for Tarantool 1.10 [1].

1. tarantool/queue#185

Part of #176
oleg-jukovec added a commit that referenced this issue Sep 12, 2022
The example demonstrates how to use the queue package with
the connection_pool package.

Closes #176
oleg-jukovec added a commit that referenced this issue Sep 12, 2022
The example demonstrates how to use the queue package with
the connection_pool package.

Closes #176
oleg-jukovec added a commit that referenced this issue Sep 13, 2022
ConnectorAdapter allows to use ConnectionPool as Connector. All
requests to a pool will be executed in a specified mode.

Part of #176
oleg-jukovec added a commit that referenced this issue Sep 13, 2022
It fixes queue.cfg({in_replicaset = true}) for Tarantool 1.10 [1].

1. tarantool/queue#185

Part of #176
oleg-jukovec added a commit that referenced this issue Sep 13, 2022
The example demonstrates how to use the queue package with
the connection_pool package.

Closes #176
oleg-jukovec added a commit that referenced this issue Sep 16, 2022
The patch adds missed Execute, ExecuteTyped and ExecuteAsync methods
to the ConnectionPool type.

Part of #176
oleg-jukovec added a commit that referenced this issue Sep 16, 2022
ConnectorAdapter allows to use ConnectionPool as Connector. All
requests to a pool will be executed in a specified mode.

Part of #176
oleg-jukovec added a commit that referenced this issue Sep 16, 2022
It fixes queue.cfg({in_replicaset = true}) for Tarantool 1.10 [1].

1. tarantool/queue#185

Part of #176
oleg-jukovec added a commit that referenced this issue Sep 16, 2022
The example demonstrates how to use the queue package with
the connection_pool package.

Closes #176
oleg-jukovec added a commit that referenced this issue Sep 20, 2022
The example demonstrates how to use the queue package with
the connection_pool package.

Closes #176
oleg-jukovec added a commit that referenced this issue Sep 20, 2022
The example demonstrates how to use the queue package with
the connection_pool package.

Closes #176
oleg-jukovec added a commit that referenced this issue Sep 22, 2022
The patch adds missed Execute, ExecuteTyped and ExecuteAsync methods
to the ConnectionPool type.

Part of #176
oleg-jukovec added a commit that referenced this issue Sep 22, 2022
ConnectorAdapter allows to use ConnectionPool as Connector. All
requests to a pool will be executed in a specified mode.

Part of #176
oleg-jukovec added a commit that referenced this issue Sep 22, 2022
It fixes queue.cfg({in_replicaset = true}) for Tarantool 1.10 [1].

1. tarantool/queue#185

Part of #176
oleg-jukovec added a commit that referenced this issue Sep 22, 2022
The example demonstrates how to use the queue package with
the connection_pool package.

Closes #176
oleg-jukovec added a commit that referenced this issue Sep 22, 2022
The example demonstrates how to use the queue package with
the connection_pool package.

Closes #176
oleg-jukovec added a commit that referenced this issue Sep 22, 2022
The example demonstrates how to use the queue package with
the connection_pool package.

Closes #176
oleg-jukovec added a commit that referenced this issue Sep 23, 2022
The example demonstrates how to use the queue package with
the connection_pool package.

Closes #176
oleg-jukovec added a commit that referenced this issue Sep 23, 2022
The example demonstrates how to use the queue package with
the connection_pool package.

Closes #176
oleg-jukovec added a commit that referenced this issue Sep 23, 2022
The example demonstrates how to use the queue package with
the connection_pool package.

Closes #176
oleg-jukovec added a commit that referenced this issue Sep 23, 2022
The example demonstrates how to use the queue package with
the connection_pool package.

Closes #176
oleg-jukovec added a commit that referenced this issue Sep 23, 2022
The example demonstrates how to use the queue package with
the connection_pool package.

Closes #176
oleg-jukovec added a commit that referenced this issue Sep 30, 2022
The patch adds missed Execute, ExecuteTyped and ExecuteAsync methods
to the ConnectionPool type.

Part of #176
oleg-jukovec added a commit that referenced this issue Sep 30, 2022
ConnectorAdapter allows to use ConnectionPool as Connector. All
requests to a pool will be executed in a specified mode.

Part of #176
oleg-jukovec added a commit that referenced this issue Sep 30, 2022
It fixes queue.cfg({in_replicaset = true}) for Tarantool 1.10 [1].

1. tarantool/queue#185

Part of #176
oleg-jukovec added a commit that referenced this issue Sep 30, 2022
The example demonstrates how to use the queue package with
the connection_pool package.

Closes #176
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