@@ -485,6 +485,10 @@ def address_is_ignored(host):
485485 load_balancing_policy=blacklist_filter_policy,
486486 )
487487
488+ See the note in the :meth:`.make_query_plan` documentation for a caveat on
489+ how wrapping ordering polices (e.g. :class:`.RoundRobinPolicy`) may break
490+ desirable properties of the wrapped policy.
491+
488492 Please note that whitelist and blacklist policies are not recommended for
489493 general, day-to-day use. You probably want something like
490494 :class:`.DCAwareRoundRobinPolicy`, which prefers a local DC but has
@@ -546,10 +550,15 @@ def populate(self, cluster, hosts):
546550 def make_query_plan (self , working_keyspace = None , query = None ):
547551 """
548552 Defers to the child policy's
549- :meth:`.LoadBalancingPolicy.make_query_plan`. Since host changes (up,
550- down, addition, and removal) have not been propagated to the child
551- policy, the child policy will only ever return policies for which
552- :meth:`.predicate(host)` was truthy when that change occurred.
553+ :meth:`.LoadBalancingPolicy.make_query_plan` and filters the results.
554+
555+ Note that this filtering may break desirable properties of the wrapped
556+ policy in some cases. For instance, imagine if you configure this
557+ policy to filter out ``host2``, and to wrap a round-robin policy that
558+ rotates through three hosts in the order ``host1, host2, host3``,
559+ ``host2, host3, host1``, ``host3, host1, host2``, repeating. This
560+ policy will yield ``host1, host3``, ``host3, host1``, ``host3, host1``,
561+ disproportionately favoring ``host3``.
553562 """
554563 child_qp = self ._child_policy .make_query_plan (
555564 working_keyspace = working_keyspace , query = query
0 commit comments