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 graceful shutdown #214

Closed
oleg-jukovec opened this issue Sep 14, 2022 · 5 comments · Fixed by #249
Closed

Support graceful shutdown #214

oleg-jukovec opened this issue Sep 14, 2022 · 5 comments · Fixed by #249
Assignees
Labels
feature A new functionality

Comments

@oleg-jukovec
Copy link
Collaborator

The graceful shutdown protocol is a mechanism that helps to prevent data loss in requests in case of a shutdown command.

https://www.tarantool.io/en/doc/latest/dev_guide/internals/box_protocol/#graceful-shutdown-protocol

@oleg-jukovec oleg-jukovec added teamE feature A new functionality labels Sep 14, 2022
@R-omk
Copy link

R-omk commented Sep 14, 2022

#119 this should be implemented first.

Details tarantool/doc#2633

@ice-ares
Copy link

what about supporting graceful shutdown from the client? Especially in the connection pool. I.E. client called .Close() or context cancelled, but we still have pending requests

@oleg-jukovec
Copy link
Collaborator Author

This is planned to be done by 2023. Perhaps it will be ready this month.

DifferentialOrange added a commit that referenced this issue Dec 16, 2022
DifferentialOrange added a commit that referenced this issue Dec 16, 2022
After this patch, "make test" behaves similar to "make test-*".

Part of #214
DifferentialOrange added a commit that referenced this issue Dec 16, 2022
If connected to Tarantool 2.10 or newer and WatchersFeature is required,
after this patch connection supports server graceful shutdown [1]. In
this case, server will wait until all client requests will be finished
and client disconnects before going down (server also may go down by
timeout). Client reconnect will happen if connection options enable
reconnect.

1. https://www.tarantool.io/en/doc/latest/dev_guide/internals/iproto/graceful_shutdown/

Closes #214
DifferentialOrange added a commit that referenced this issue Dec 16, 2022
DifferentialOrange added a commit that referenced this issue Dec 16, 2022
After this patch, "make test" behaves similar to "make test-*".

Part of #214
DifferentialOrange added a commit that referenced this issue Dec 16, 2022
If connected to Tarantool 2.10 or newer and WatchersFeature is required,
after this patch connection supports server graceful shutdown [1]. In
this case, server will wait until all client requests will be finished
and client disconnects before going down (server also may go down by
timeout). Client reconnect will happen if connection options enable
reconnect.

1. https://www.tarantool.io/en/doc/latest/dev_guide/internals/iproto/graceful_shutdown/

Closes #214
DifferentialOrange added a commit that referenced this issue Dec 16, 2022
DifferentialOrange added a commit that referenced this issue Dec 16, 2022
After this patch, "make test" behaves similar to "make test-*".

Part of #214
DifferentialOrange added a commit that referenced this issue Dec 16, 2022
If connected to Tarantool 2.10 or newer and WatchersFeature is required,
after this patch connection supports server graceful shutdown [1]. In
this case, server will wait until all client requests will be finished
and client disconnects before going down (server also may go down by
timeout). Client reconnect will happen if connection options enable
reconnect.

1. https://www.tarantool.io/en/doc/latest/dev_guide/internals/iproto/graceful_shutdown/

Closes #214
DifferentialOrange added a commit that referenced this issue Dec 16, 2022
If connected to Tarantool 2.10 or newer and WatchersFeature is required,
after this patch connection supports server graceful shutdown [1]. In
this case, server will wait until all client requests will be finished
and client disconnects before going down (server also may go down by
timeout). Client reconnect will happen if connection options enable
reconnect.

1. https://www.tarantool.io/en/doc/latest/dev_guide/internals/iproto/graceful_shutdown/

Closes #214
DifferentialOrange added a commit that referenced this issue Dec 16, 2022
If connected to Tarantool 2.10 or newer and WatchersFeature is required,
after this patch connection supports server graceful shutdown [1]. In
this case, server will wait until all client requests will be finished
and client disconnects before going down (server also may go down by
timeout). Client reconnect will happen if connection options enable
reconnect.

1. https://www.tarantool.io/en/doc/latest/dev_guide/internals/iproto/graceful_shutdown/

Closes #214
DifferentialOrange added a commit that referenced this issue Dec 20, 2022
If connected to Tarantool 2.10 or newer and WatchersFeature is required,
after this patch connection supports server graceful shutdown [1]. In
this case, server will wait until all client requests will be finished
and client disconnects before going down (server also may go down by
timeout). Client reconnect will happen if connection options enable
reconnect.

1. https://www.tarantool.io/en/doc/latest/dev_guide/internals/iproto/graceful_shutdown/

Closes #214
DifferentialOrange added a commit that referenced this issue Dec 20, 2022
If connected to Tarantool 2.10 or newer and WatchersFeature is required,
after this patch connection supports server graceful shutdown [1]. In
this case, server will wait until all client requests will be finished
and client disconnects before going down (server also may go down by
timeout). Client reconnect will happen if connection options enable
reconnect.

1. https://www.tarantool.io/en/doc/latest/dev_guide/internals/iproto/graceful_shutdown/

Closes #214
DifferentialOrange added a commit that referenced this issue Dec 21, 2022
If connected to Tarantool 2.10 or newer and WatchersFeature is required,
after this patch connection supports server graceful shutdown [1]. In
this case, server will wait until all client requests will be finished
and client disconnects before going down (server also may go down by
timeout). Client reconnect will happen if connection options enable
reconnect.

1. https://www.tarantool.io/en/doc/latest/dev_guide/internals/iproto/graceful_shutdown/

Closes #214
DifferentialOrange added a commit that referenced this issue Dec 21, 2022
If connected to Tarantool 2.10 or newer and WatchersFeature is required,
after this patch connection supports server graceful shutdown [1]. In
this case, server will wait until all client requests will be finished
and client disconnects before going down (server also may go down by
timeout). Client reconnect will happen if connection options enable
reconnect.

1. https://www.tarantool.io/en/doc/latest/dev_guide/internals/iproto/graceful_shutdown/

Closes #214
DifferentialOrange added a commit that referenced this issue Dec 21, 2022
If connected to Tarantool 2.10 or newer and WatchersFeature is required,
after this patch connection supports server graceful shutdown [1]. In
this case, server will wait until all client requests will be finished
and client disconnects before going down (server also may go down by
timeout). Client reconnect will happen if connection options enable
reconnect.

1. https://www.tarantool.io/en/doc/latest/dev_guide/internals/iproto/graceful_shutdown/

Closes #214
DifferentialOrange added a commit that referenced this issue Dec 21, 2022
If connected to Tarantool 2.10 or newer and WatchersFeature is required,
after this patch connection supports server graceful shutdown [1]. In
this case, server will wait until all client requests will be finished
and client disconnects before going down (server also may go down by
timeout). Client reconnect will happen if connection options enable
reconnect.

1. https://www.tarantool.io/en/doc/latest/dev_guide/internals/iproto/graceful_shutdown/

Closes #214
DifferentialOrange added a commit that referenced this issue Dec 21, 2022
If connected to Tarantool 2.10 or newer and WatchersFeature is required,
after this patch connection supports server graceful shutdown [1]. In
this case, server will wait until all client requests will be finished
and client disconnects before going down (server also may go down by
timeout). Client reconnect will happen if connection options enable
reconnect.

1. https://www.tarantool.io/en/doc/latest/dev_guide/internals/iproto/graceful_shutdown/

Closes #214
DifferentialOrange added a commit that referenced this issue Dec 21, 2022
If connected to Tarantool 2.10 or newer and WatchersFeature is required,
after this patch connection supports server graceful shutdown [1]. In
this case, server will wait until all client requests will be finished
and client disconnects before going down (server also may go down by
timeout). Client reconnect will happen if connection options enable
reconnect.

1. https://www.tarantool.io/en/doc/latest/dev_guide/internals/iproto/graceful_shutdown/

Closes #214
DifferentialOrange added a commit that referenced this issue Dec 21, 2022
DifferentialOrange added a commit that referenced this issue Dec 21, 2022
After this patch, "make test" behaves similar to "make test-*".

Part of #214
DifferentialOrange added a commit that referenced this issue Dec 21, 2022
If connected to Tarantool 2.10 or newer and WatchersFeature is required,
after this patch connection supports server graceful shutdown [1]. In
this case, server will wait until all client requests will be finished
and client disconnects before going down (server also may go down by
timeout). Client reconnect will happen if connection options enable
reconnect.

1. https://www.tarantool.io/en/doc/latest/dev_guide/internals/iproto/graceful_shutdown/

Closes #214
DifferentialOrange added a commit that referenced this issue Dec 21, 2022
DifferentialOrange added a commit that referenced this issue Dec 21, 2022
If connected to Tarantool 2.10 or newer and WatchersFeature is required,
after this patch connection supports server graceful shutdown [1]. In
this case, server will wait until all client requests will be finished
and client disconnects before going down (server also may go down by
timeout). Client reconnect will happen if connection options enable
reconnect. Beware that graceful shutdown event initialization is
asynchronous.

1. https://www.tarantool.io/en/doc/latest/dev_guide/internals/iproto/graceful_shutdown/

Closes #214
DifferentialOrange added a commit that referenced this issue Dec 21, 2022
DifferentialOrange added a commit that referenced this issue Dec 21, 2022
If connected to Tarantool 2.10 or newer and WatchersFeature is required,
after this patch connection supports server graceful shutdown [1]. In
this case, server will wait until all client requests will be finished
and client disconnects before going down (server also may go down by
timeout). Client reconnect will happen if connection options enable
reconnect. Beware that graceful shutdown event initialization is
asynchronous.

1. https://www.tarantool.io/en/doc/latest/dev_guide/internals/iproto/graceful_shutdown/

Closes #214
DifferentialOrange added a commit that referenced this issue Dec 25, 2022
If connected to Tarantool 2.10 or newer and WatchersFeature is required,
after this patch connection supports server graceful shutdown [1]. In
this case, server will wait until all client requests will be finished
and client disconnects before going down (server also may go down by
timeout). Client reconnect will happen if connection options enable
reconnect. Beware that graceful shutdown event initialization is
asynchronous.

1. https://www.tarantool.io/en/doc/latest/dev_guide/internals/iproto/graceful_shutdown/

Closes #214
DifferentialOrange added a commit that referenced this issue Dec 25, 2022
If connected to Tarantool 2.10 or newer, after this patch a connection
supports server graceful shutdown [1]. In this case, server will wait
until all client requests will be finished and client disconnects before
going down (server also may go down by timeout). Client reconnect will
happen if connection options enable reconnect. Beware that graceful
shutdown event initialization is asynchronous.

1. https://www.tarantool.io/en/doc/latest/dev_guide/internals/iproto/graceful_shutdown/

Closes #214
DifferentialOrange added a commit that referenced this issue Dec 26, 2022
If connected to Tarantool 2.10 or newer, after this patch a connection
supports server graceful shutdown [1]. In this case, server will wait
until all client requests will be finished and client disconnects before
going down (server also may go down by timeout). Client reconnect will
happen if connection options enable reconnect. Beware that graceful
shutdown event initialization is asynchronous.

1. https://www.tarantool.io/en/doc/latest/dev_guide/internals/iproto/graceful_shutdown/

Closes #214
oleg-jukovec pushed a commit that referenced this issue Dec 28, 2022
oleg-jukovec pushed a commit that referenced this issue Dec 28, 2022
After this patch, "make test" behaves similar to "make test-*".

Part of #214
oleg-jukovec pushed a commit that referenced this issue Dec 28, 2022
If connected to Tarantool 2.10 or newer, after this patch a connection
supports server graceful shutdown [1]. In this case, server will wait
until all client requests will be finished and client disconnects before
going down (server also may go down by timeout). Client reconnect will
happen if connection options enable reconnect. Beware that graceful
shutdown event initialization is asynchronous.

1. https://www.tarantool.io/en/doc/latest/dev_guide/internals/iproto/graceful_shutdown/

Closes #214
oleg-jukovec pushed a commit that referenced this issue Dec 28, 2022
oleg-jukovec pushed a commit that referenced this issue Dec 28, 2022
After this patch, "make test" behaves similar to "make test-*".

Part of #214
oleg-jukovec pushed a commit that referenced this issue Dec 28, 2022
If connected to Tarantool 2.10 or newer, after this patch a connection
supports server graceful shutdown [1]. In this case, server will wait
until all client requests will be finished and client disconnects before
going down (server also may go down by timeout). Client reconnect will
happen if connection options enable reconnect. Beware that graceful
shutdown event initialization is asynchronous.

1. https://www.tarantool.io/en/doc/latest/dev_guide/internals/iproto/graceful_shutdown/

Closes #214
oleg-jukovec added a commit that referenced this issue Dec 28, 2022
Overview

    The release improves compatibility with new Tarantool versions.

Breaking changes

    There are no breaking changes in the release.

New features

    Support iproto feature discovery (#120).

    Support errors extended information (#209).

    Support error type in MessagePack (#209).

    Support event subscriptin (#119).

    Support session settings (#215).

    Support pap-sha256 authorization method (Tarantool EE
    feature) (#243).

    Support graceful shutdown (#214).

Bugfixes

    Decimal package uses a test variable DecimalPrecision instead
    of a package-level variable decimalPrecision (#233).

    Flaky test TestClientRequestObjectsWithContext (#244).

    Flaky test multi/TestDisconnectAll (#234).
@ice-ares
Copy link

what about supporting graceful shutdown from the client? Especially in the connection pool. I.E. client called .Close() or context cancelled, but we still have pending requests

@oleg-jukovec what about that?

@oleg-jukovec
Copy link
Collaborator Author

oleg-jukovec commented Dec 28, 2022

What about supporting graceful shutdown from the client?

Unfortunately, this is not in the product plan. First of all, because the request counter can be implemented on the client side.
Right now we are focused on features that cannot be done on the client side.

Especially in the connection pool. I.E. client called .Close()

I have opened a new issue:
#257

or context cancelled

This is a limitation of the IPHOTO protocol. We cannot cancel a request that has already been sent over network.
Therefore, if the request has already been sent, it is canceled only at the Go-language level.

oleg-jukovec added a commit that referenced this issue Dec 29, 2022
Overview

    The release improves compatibility with new Tarantool versions.

Breaking changes

    There are no breaking changes in the release.

New features

    Support iproto feature discovery (#120).

    Support errors extended information (#209).

    Support error type in MessagePack (#209).

    Support event subscription (#119).

    Support session settings (#215).

    Support pap-sha256 authorization method (Tarantool EE
    feature) (#243).

    Support graceful shutdown (#214).

Bugfixes

    Decimal package uses a test variable DecimalPrecision instead
    of a package-level variable decimalPrecision (#233).

    Flaky test TestClientRequestObjectsWithContext (#244).

    Flaky test multi/TestDisconnectAll (#234).
oleg-jukovec added a commit that referenced this issue Dec 30, 2022
Overview

    The release improves compatibility with new Tarantool versions.

Breaking changes

    There are no breaking changes in the release.

New features

    Support iproto feature discovery (#120).

    Support errors extended information (#209).

    Support error type in MessagePack (#209).

    Support event subscription (#119).

    Support session settings (#215).

    Support pap-sha256 authorization method (Tarantool EE
    feature) (#243).

    Support graceful shutdown (#214).

Bugfixes

    Decimal package uses a test variable DecimalPrecision instead
    of a package-level variable decimalPrecision (#233).

    Flaky test TestClientRequestObjectsWithContext (#244).

    Flaky test multi/TestDisconnectAll (#234).
pull bot pushed a commit to kokizzu/go-tarantool that referenced this issue Jan 1, 2023
Overview

    The release improves compatibility with new Tarantool versions.

Breaking changes

    There are no breaking changes in the release.

New features

    Support iproto feature discovery (tarantool#120).

    Support errors extended information (tarantool#209).

    Support error type in MessagePack (tarantool#209).

    Support event subscription (tarantool#119).

    Support session settings (tarantool#215).

    Support pap-sha256 authorization method (Tarantool EE
    feature) (tarantool#243).

    Support graceful shutdown (tarantool#214).

Bugfixes

    Decimal package uses a test variable DecimalPrecision instead
    of a package-level variable decimalPrecision (tarantool#233).

    Flaky test TestClientRequestObjectsWithContext (tarantool#244).

    Flaky test multi/TestDisconnectAll (tarantool#234).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants