Skip to content

Commit

Permalink
MB-52159 Advertise rangeScan feature in bucket capabilities
Browse files Browse the repository at this point in the history
Change-Id: Ica6a0aa53e4fdd6d20177ab517d22312ff05fba2
Reviewed-on: https://review.couchbase.org/c/ns_server/+/176833
Tested-by: Navdeep S Boparai <navdeep.boparai@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Steve Watanabe <steve.watanabe@couchbase.com>
Well-Formed: Build Bot <build@couchbase.com>
  • Loading branch information
boparai11 committed Jun 30, 2022
1 parent 2740dae commit b1b84a5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/bucket_info_cache.erl
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,14 @@ build_pools_uri(Tail, UUID) ->
["pools", "default"] ++ Tail,
[{"bucket_uuid", UUID} || UUID =/= undefined]).

maybe_range_scan_capability(BucketConfig) ->
case ns_bucket:is_persistent(BucketConfig) of
true ->
[{rangeScan, cluster_compat_mode:is_cluster_elixir()}];
false ->
[]
end.

build_bucket_capabilities(BucketConfig) ->
Caps =
case ns_bucket:bucket_type(BucketConfig) of
Expand All @@ -293,7 +301,8 @@ build_bucket_capabilities(BucketConfig) ->
{'subdoc.ReviveDocument',
cluster_compat_mode:is_cluster_71()},
{preserveExpiry,
cluster_compat_mode:is_cluster_elixir()}],
cluster_compat_mode:is_cluster_elixir()}] ++
maybe_range_scan_capability(BucketConfig),

[C || {C, true} <- Conditional] ++
[dcp, cbhello, touch, cccp, xdcrCheckpointing, nodesExt,
Expand Down

0 comments on commit b1b84a5

Please sign in to comment.