Skip to content

Commit 8f0a5d2

Browse files
committed
RCBC-530: Deprecate Support for MapReduce Views Since Server Deprecated
1 parent c6a8af1 commit 8f0a5d2

File tree

6 files changed

+17
-1
lines changed

6 files changed

+17
-1
lines changed

Rakefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ task :cache_cxx_dependencies do
226226
"-DCPM_USE_LOCAL_PACKAGES=OFF",
227227
"-DCPM_SOURCE_CACHE=#{cpm_cache_dir}",
228228
"-DCOUCHBASE_CXX_CLIENT_EMBED_MOZILLA_CA_BUNDLE_ROOT=#{cpm_cache_dir}",
229+
"-DCOUCHBASE_CXX_CLIENT_BUILD_OPENTELEMETRY=OFF",
229230
]
230231
cmake_flags << "-DCMAKE_C_COMPILER=#{cc}" if cc
231232
cmake_flags << "-DCMAKE_CXX_COMPILER=#{cxx}" if cxx

ext/couchbase

ext/extconf.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ def sys(*cmd)
9797
"-DCOUCHBASE_CXX_CLIENT_BUILD_TOOLS=OFF",
9898
"-DCOUCHBASE_CXX_CLIENT_BUILD_EXAMPLES=OFF",
9999
"-DCOUCHBASE_CXX_CLIENT_INSTALL=OFF",
100+
"-DCOUCHBASE_CXX_CLIENT_BUILD_OPENTELEMETRY=OFF",
100101
]
101102

102103
if version.start_with?("4")

ext/rcb_views.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@
1515
* limitations under the License.
1616
*/
1717

18+
#define COUCHBASE_CXX_CLIENT_IGNORE_CORE_DEPRECATIONS
1819
#include <core/cluster.hxx>
1920
#include <core/design_document_namespace_fmt.hxx>
2021
#include <core/operations/document_view.hxx>
2122
#include <core/operations/management/view_index_drop.hxx>
2223
#include <core/operations/management/view_index_get.hxx>
2324
#include <core/operations/management/view_index_get_all.hxx>
2425
#include <core/operations/management/view_index_upsert.hxx>
26+
#undef COUCHBASE_CXX_CLIENT_IGNORE_CORE_DEPRECATIONS
2527

2628
#include <future>
2729

lib/couchbase/bucket.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ def default_collection
8585
# ))
8686
#
8787
# @return [ViewResult]
88+
#
89+
# @deprecated Views are deprecated in Couchbase Server 7.0+, and will be removed from a future server version.
90+
# Views are not compatible with the Magma storage engine. Instead of views, use indexes and queries using the
91+
# Index Service (GSI) and the Query Service (SQL++).
8892
def view_query(design_document_name, view_name, options = Options::View::DEFAULT)
8993
@observability.record_operation(Observability::OP_VIEW_QUERY, opts.parent_span, self, :views) do |_obs_handler|
9094
resp = @backend.document_view(@name, design_document_name, view_name, options.namespace, options.to_backend)
@@ -110,6 +114,10 @@ def collections
110114
end
111115

112116
# @return [Management::ViewIndexManager]
117+
#
118+
# @deprecated Views are deprecated in Couchbase Server 7.0+, and will be removed from a future server version.
119+
# Views are not compatible with the Magma storage engine. Instead of views, use indexes and queries using the
120+
# Index Service (GSI) and the Query Service (SQL++).
113121
def view_indexes
114122
Management::ViewIndexManager.new(@backend, @name, @observability)
115123
end

lib/couchbase/management/view_index_manager.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ def initialize(timeout: nil,
138138
# All methods (except publish) have a required "namespace" argument indicating whether the operation targets a
139139
# development document or a production document. The type of this argument is [Symbol] with allowed values
140140
# +:production+ and +:development+.
141+
#
142+
# @deprecated Views are deprecated in Couchbase Server 7.0+, and will be removed from a future server version.
143+
# Views are not compatible with the Magma storage engine. Instead of views, use indexes and queries using the
144+
# Index Service (GSI) and the Query Service (SQL++).
141145
class ViewIndexManager
142146
alias inspect to_s
143147

0 commit comments

Comments
 (0)