Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
internal: drop graceful shutdown feature flag
Graceful shutdown was introduced in Tarantool with [1]. A week later it
was reworked with [2]. So the timeline is as follows.

- Graceful shutdown is introduced, new feature flag is added and
  the protocol version is bumped to 4.
- Graceful shutdown is reworked, feature flag is dropped and the
  protocol version is dropped to 3.
- Next Tarantool version released.

So the idea for users is "IPROTO_FEATURE_GRACEFUL_SHUTDOWN and
protocol version 4 never existed". It also means that any new feature
flag may have value `4` (same as IPROTO_FEATURE_GRACEFUL_SHUTDOWN), but
with completely different meaning. IPROTO_FEATURE_GRACEFUL_SHUTDOWN flag
was added in [3] by mistake due to misunderstanding the event timeline.
This patch removes the flag. Since `_features` dict is an internal of a
connection object, the change shouldn't break anything for users.

1. tarantool/tarantool@6f29f9d
2. tarantool/tarantool@2e9cbec
3. #243

Closes #262
  • Loading branch information
DifferentialOrange committed Nov 11, 2022
commit 18bb7de8908248e80ce0caaa3517e0cb0974d35a
2 changes: 0 additions & 2 deletions tarantool/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
IPROTO_FEATURE_TRANSACTIONS,
IPROTO_FEATURE_ERROR_EXTENSION,
IPROTO_FEATURE_WATCHERS,
IPROTO_FEATURE_GRACEFUL_SHUTDOWN,
IPROTO_CHUNK,
)
from tarantool.error import (
Expand Down Expand Up @@ -514,7 +513,6 @@ def __init__(self, host, port,
IPROTO_FEATURE_TRANSACTIONS: False,
IPROTO_FEATURE_ERROR_EXTENSION: False,
IPROTO_FEATURE_WATCHERS: False,
IPROTO_FEATURE_GRACEFUL_SHUTDOWN: False,
}

if connect_now:
Expand Down
1 change: 0 additions & 1 deletion tarantool/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
IPROTO_FEATURE_TRANSACTIONS = 1
IPROTO_FEATURE_ERROR_EXTENSION = 2
IPROTO_FEATURE_WATCHERS = 3
IPROTO_FEATURE_GRACEFUL_SHUTDOWN = 4

# Default value for connection timeout (seconds)
CONNECTION_TIMEOUT = None
Expand Down
2 changes: 0 additions & 2 deletions test/suites/test_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
IPROTO_FEATURE_TRANSACTIONS,
IPROTO_FEATURE_ERROR_EXTENSION,
IPROTO_FEATURE_WATCHERS,
IPROTO_FEATURE_GRACEFUL_SHUTDOWN,
)

class TestSuite_Protocol(unittest.TestCase):
Expand Down Expand Up @@ -86,7 +85,6 @@ def test_04_protocol(self):
self.assertEqual(self.con._features[IPROTO_FEATURE_STREAMS], False)
self.assertEqual(self.con._features[IPROTO_FEATURE_TRANSACTIONS], False)
self.assertEqual(self.con._features[IPROTO_FEATURE_WATCHERS], False)
self.assertEqual(self.con._features[IPROTO_FEATURE_GRACEFUL_SHUTDOWN], False)

@classmethod
def tearDownClass(self):
Expand Down