Skip to content

Commit a94306b

Browse files
committed
Remove DSE only continuous_paging_options feature
I'm not removing it entirely from the code, but ignoring it where it matters, so it's essentially useless. I think it's a reasonable balance between breaking the API of some classes and removal of the feature. Signed-off-by: Yaniv Kaul <[email protected]>
1 parent ce73513 commit a94306b

File tree

4 files changed

+0
-58
lines changed

4 files changed

+0
-58
lines changed

cassandra/cluster.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4498,7 +4498,6 @@ class ResponseFuture(object):
44984498
_timer = None
44994499
_protocol_handler = ProtocolHandler
45004500
_spec_execution_plan = NoSpeculativeExecutionPlan()
4501-
_continuous_paging_options = None
45024501
_continuous_paging_session = None
45034502
_host = None
45044503

cassandra/protocol.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,6 @@ def __init__(self, query_params, consistency_level,
553553
self.paging_state = paging_state
554554
self.timestamp = timestamp
555555
self.skip_meta = skip_meta
556-
self.continuous_paging_options = continuous_paging_options
557556
self.keyspace = keyspace
558557

559558
def _write_query_params(self, f, protocol_version):
@@ -574,10 +573,6 @@ def _write_query_params(self, f, protocol_version):
574573
if self.timestamp is not None:
575574
flags |= _PROTOCOL_TIMESTAMP_FLAG
576575

577-
if self.continuous_paging_options:
578-
raise UnsupportedOperation(
579-
"Continuous paging may only be used with future protocol versions")
580-
581576
if self.keyspace is not None:
582577
if ProtocolVersion.uses_keyspace_flag(protocol_version):
583578
flags |= _WITH_KEYSPACE_FLAG
@@ -605,8 +600,6 @@ def _write_query_params(self, f, protocol_version):
605600
write_long(f, self.timestamp)
606601
if self.keyspace is not None:
607602
write_string(f, self.keyspace)
608-
if self.continuous_paging_options:
609-
self._write_paging_options(f, self.continuous_paging_options, protocol_version)
610603

611604
def _write_paging_options(self, f, paging_options, protocol_version):
612605
write_int(f, paging_options.max_pages)

tests/integration/standard/test_custom_protocol_handler.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -120,38 +120,6 @@ def test_custom_raw_row_results_all_types(self):
120120
self.assertEqual(len(CustomResultMessageTracked.checked_rev_row_set), len(PRIMITIVE_DATATYPES)-1)
121121
cluster.shutdown()
122122

123-
@unittest.expectedFailure
124-
@greaterthanorequalcass40
125-
def test_protocol_divergence_v5_fail_by_continuous_paging(self):
126-
"""
127-
Test to validate that V5 and DSE_V1 diverge. ContinuousPagingOptions is not supported by V5
128-
129-
@since DSE 2.0b3 GRAPH 1.0b1
130-
@jira_ticket PYTHON-694
131-
@expected_result NoHostAvailable will be risen when the continuous_paging_options parameter is set
132-
133-
@test_category connection
134-
"""
135-
cluster = TestCluster(protocol_version=ProtocolVersion.V5, allow_beta_protocol_version=True)
136-
session = cluster.connect()
137-
138-
max_pages = 4
139-
max_pages_per_second = 3
140-
continuous_paging_options = ContinuousPagingOptions(max_pages=max_pages,
141-
max_pages_per_second=max_pages_per_second)
142-
143-
future = self._send_query_message(session, timeout=session.default_timeout,
144-
consistency_level=ConsistencyLevel.ONE,
145-
continuous_paging_options=continuous_paging_options)
146-
147-
# This should raise NoHostAvailable because continuous paging is not supported under ProtocolVersion.DSE_V1
148-
with self.assertRaises(NoHostAvailable) as context:
149-
future.result()
150-
self.assertIn("Continuous paging may only be used with protocol version ProtocolVersion.DSE_V1 or higher",
151-
str(context.exception))
152-
153-
cluster.shutdown()
154-
155123
@greaterthanorequalcass30
156124
def test_protocol_divergence_v4_fail_by_flag_uses_int(self):
157125
"""

tests/unit/test_protocol.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -93,24 +93,6 @@ def _check_calls(self, io, expected):
9393
tuple(expected)
9494
)
9595

96-
def test_continuous_paging(self):
97-
"""
98-
Test to check continuous paging throws an Exception as it's not supported
99-
@since DSE 2.0b3 GRAPH 1.0b1
100-
@jira_ticket PYTHON-694
101-
@expected_result the values are correctly written
102-
103-
@test_category connection
104-
"""
105-
max_pages = 4
106-
max_pages_per_second = 3
107-
continuous_paging_options = ContinuousPagingOptions(max_pages=max_pages,
108-
max_pages_per_second=max_pages_per_second)
109-
message = QueryMessage("a", 3, continuous_paging_options=continuous_paging_options)
110-
io = Mock()
111-
for version in ProtocolVersion.SUPPORTED_VERSIONS:
112-
self.assertRaises(UnsupportedOperation, message.send_body, io, version)
113-
11496
def test_prepare_flag(self):
11597
"""
11698
Test to check the prepare flag is properly set, This should only happen for V5 at the moment.

0 commit comments

Comments
 (0)