|
51 | 51 | from cassandra.connection import (ConnectionException, ConnectionShutdown, |
52 | 52 | ConnectionHeartbeat, ProtocolVersionUnsupported, |
53 | 53 | EndPoint, DefaultEndPoint, DefaultEndPointFactory, |
54 | | - ContinuousPagingState, SniEndPointFactory, ConnectionBusy) |
| 54 | + SniEndPointFactory, ConnectionBusy) |
55 | 55 | from cassandra.cqltypes import UserType |
56 | 56 | import cassandra.cqltypes as types |
57 | 57 | from cassandra.encoder import Encoder |
@@ -672,15 +672,15 @@ class Cluster(object): |
672 | 672 | server will be automatically used. |
673 | 673 | """ |
674 | 674 |
|
675 | | - protocol_version = ProtocolVersion.DSE_V2 |
| 675 | + protocol_version = ProtocolVersion.V5 |
676 | 676 | """ |
677 | 677 | The maximum version of the native protocol to use. |
678 | 678 |
|
679 | 679 | See :class:`.ProtocolVersion` for more information about versions. |
680 | 680 |
|
681 | 681 | If not set in the constructor, the driver will automatically downgrade |
682 | 682 | version based on a negotiation with the server, but it is most efficient |
683 | | - to set this to the maximum supported by your version of Cassandra. |
| 683 | + to set this to the maximum supported by your version of ScyllaDB. |
684 | 684 | Setting this will also prevent conflicting versions negotiated if your |
685 | 685 | cluster is upgraded. |
686 | 686 |
|
@@ -2692,7 +2692,6 @@ def __init__(self, cluster, hosts, keyspace=None): |
2692 | 2692 | raise NoHostAvailable(msg, [h.address for h in hosts]) |
2693 | 2693 |
|
2694 | 2694 | self.session_id = uuid.uuid4() |
2695 | | - self._graph_paging_available = self._check_graph_paging_available() |
2696 | 2695 |
|
2697 | 2696 | if self.cluster.column_encryption_policy is not None: |
2698 | 2697 | try: |
@@ -2889,26 +2888,10 @@ def execute_graph_async(self, query, parameters=None, trace=False, execution_pro |
2889 | 2888 | def _maybe_set_graph_paging(self, execution_profile): |
2890 | 2889 | graph_paging = execution_profile.continuous_paging_options |
2891 | 2890 | if execution_profile.continuous_paging_options is _NOT_SET: |
2892 | | - graph_paging = ContinuousPagingOptions() if self._graph_paging_available else None |
| 2891 | + graph_paging = None |
2893 | 2892 |
|
2894 | 2893 | execution_profile.continuous_paging_options = graph_paging |
2895 | 2894 |
|
2896 | | - def _check_graph_paging_available(self): |
2897 | | - """Verify if we can enable graph paging. This executed only once when the session is created.""" |
2898 | | - |
2899 | | - if not ProtocolVersion.has_continuous_paging_next_pages(self._protocol_version): |
2900 | | - return False |
2901 | | - |
2902 | | - for host in self.cluster.metadata.all_hosts(): |
2903 | | - if host.dse_version is None: |
2904 | | - return False |
2905 | | - |
2906 | | - version = Version(host.dse_version) |
2907 | | - if version < _GRAPH_PAGING_MIN_DSE_VERSION: |
2908 | | - return False |
2909 | | - |
2910 | | - return True |
2911 | | - |
2912 | 2895 | def _resolve_execution_profile_options(self, execution_profile): |
2913 | 2896 | """ |
2914 | 2897 | Determine the GraphSON protocol and row factory for a graph query. This is useful |
@@ -3053,14 +3036,6 @@ def _create_response_future(self, query, parameters, trace, custom_payload, |
3053 | 3036 | else: |
3054 | 3037 | timestamp = None |
3055 | 3038 |
|
3056 | | - supports_continuous_paging_state = ( |
3057 | | - ProtocolVersion.has_continuous_paging_next_pages(self._protocol_version) |
3058 | | - ) |
3059 | | - if continuous_paging_options and supports_continuous_paging_state: |
3060 | | - continuous_paging_state = ContinuousPagingState(continuous_paging_options.max_queue_size) |
3061 | | - else: |
3062 | | - continuous_paging_state = None |
3063 | | - |
3064 | 3039 | if isinstance(query, SimpleStatement): |
3065 | 3040 | query_string = query.query_string |
3066 | 3041 | statement_keyspace = query.keyspace if ProtocolVersion.uses_keyspace_flag(self._protocol_version) else None |
@@ -3104,7 +3079,7 @@ def _create_response_future(self, query, parameters, trace, custom_payload, |
3104 | 3079 | self, message, query, timeout, metrics=self._metrics, |
3105 | 3080 | prepared_statement=prepared_statement, retry_policy=retry_policy, row_factory=row_factory, |
3106 | 3081 | load_balancer=load_balancing_policy, start_time=start_time, speculative_execution_plan=spec_exec_plan, |
3107 | | - continuous_paging_state=continuous_paging_state, host=host) |
| 3082 | + continuous_paging_state=None, host=host) |
3108 | 3083 |
|
3109 | 3084 | def get_execution_profile(self, name): |
3110 | 3085 | """ |
|
0 commit comments