Skip to content

Commit 18bb7de

Browse files
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
1 parent 6c54109 commit 18bb7de

File tree

3 files changed

+0
-5
lines changed

3 files changed

+0
-5
lines changed

Diff for: tarantool/connection.py

-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
IPROTO_FEATURE_TRANSACTIONS,
6464
IPROTO_FEATURE_ERROR_EXTENSION,
6565
IPROTO_FEATURE_WATCHERS,
66-
IPROTO_FEATURE_GRACEFUL_SHUTDOWN,
6766
IPROTO_CHUNK,
6867
)
6968
from tarantool.error import (
@@ -514,7 +513,6 @@ def __init__(self, host, port,
514513
IPROTO_FEATURE_TRANSACTIONS: False,
515514
IPROTO_FEATURE_ERROR_EXTENSION: False,
516515
IPROTO_FEATURE_WATCHERS: False,
517-
IPROTO_FEATURE_GRACEFUL_SHUTDOWN: False,
518516
}
519517

520518
if connect_now:

Diff for: tarantool/const.py

-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@
9696
IPROTO_FEATURE_TRANSACTIONS = 1
9797
IPROTO_FEATURE_ERROR_EXTENSION = 2
9898
IPROTO_FEATURE_WATCHERS = 3
99-
IPROTO_FEATURE_GRACEFUL_SHUTDOWN = 4
10099

101100
# Default value for connection timeout (seconds)
102101
CONNECTION_TIMEOUT = None

Diff for: test/suites/test_protocol.py

-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
IPROTO_FEATURE_TRANSACTIONS,
1414
IPROTO_FEATURE_ERROR_EXTENSION,
1515
IPROTO_FEATURE_WATCHERS,
16-
IPROTO_FEATURE_GRACEFUL_SHUTDOWN,
1716
)
1817

1918
class TestSuite_Protocol(unittest.TestCase):
@@ -86,7 +85,6 @@ def test_04_protocol(self):
8685
self.assertEqual(self.con._features[IPROTO_FEATURE_STREAMS], False)
8786
self.assertEqual(self.con._features[IPROTO_FEATURE_TRANSACTIONS], False)
8887
self.assertEqual(self.con._features[IPROTO_FEATURE_WATCHERS], False)
89-
self.assertEqual(self.con._features[IPROTO_FEATURE_GRACEFUL_SHUTDOWN], False)
9088

9189
@classmethod
9290
def tearDownClass(self):

0 commit comments

Comments
 (0)