From 0b02c7051218b984798325e76d4891bbc3edba6b Mon Sep 17 00:00:00 2001 From: Dimitris Christodoulou <36637689+DemetrisChr@users.noreply.github.com> Date: Tue, 11 Nov 2025 10:47:58 +0000 Subject: [PATCH] RCBC-530: Deprecate Support for MapReduce Views Since Server Deprecated --- Rakefile | 2 ++ ext/couchbase | 2 +- ext/extconf.rb | 1 + ext/rcb_views.cxx | 2 ++ lib/couchbase/bucket.rb | 8 ++++++++ lib/couchbase/management/view_index_manager.rb | 4 ++++ 6 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index efc248d9..0594c795 100644 --- a/Rakefile +++ b/Rakefile @@ -110,6 +110,7 @@ task :cache_cxx_dependencies do "-DCOUCHBASE_CXX_CLIENT_BUILD_TOOLS=OFF", "-DCOUCHBASE_CXX_CLIENT_BUILD_DOCS=OFF", "-DCOUCHBASE_CXX_CLIENT_STATIC_BORINGSSL=ON", + "-DCOUCHBASE_CXX_CLIENT_BUILD_OPENTELEMETRY=OFF", "-DCPM_DOWNLOAD_ALL=ON", "-DCPM_USE_NAMED_CACHE_DIRECTORIES=ON", "-DCPM_USE_LOCAL_PACKAGES=OFF", @@ -226,6 +227,7 @@ task :cache_cxx_dependencies do "-DCPM_USE_LOCAL_PACKAGES=OFF", "-DCPM_SOURCE_CACHE=#{cpm_cache_dir}", "-DCOUCHBASE_CXX_CLIENT_EMBED_MOZILLA_CA_BUNDLE_ROOT=#{cpm_cache_dir}", + "-DCOUCHBASE_CXX_CLIENT_BUILD_OPENTELEMETRY=OFF", ] cmake_flags << "-DCMAKE_C_COMPILER=#{cc}" if cc cmake_flags << "-DCMAKE_CXX_COMPILER=#{cxx}" if cxx diff --git a/ext/couchbase b/ext/couchbase index 3a383490..a13bafb9 160000 --- a/ext/couchbase +++ b/ext/couchbase @@ -1 +1 @@ -Subproject commit 3a383490d3e61ddaf078316b6e28c4c948f91dd2 +Subproject commit a13bafb98931c9a3aff2722eafbb5379267dedf0 diff --git a/ext/extconf.rb b/ext/extconf.rb index 183a78a3..c57089ed 100644 --- a/ext/extconf.rb +++ b/ext/extconf.rb @@ -97,6 +97,7 @@ def sys(*cmd) "-DCOUCHBASE_CXX_CLIENT_BUILD_TOOLS=OFF", "-DCOUCHBASE_CXX_CLIENT_BUILD_EXAMPLES=OFF", "-DCOUCHBASE_CXX_CLIENT_INSTALL=OFF", + "-DCOUCHBASE_CXX_CLIENT_BUILD_OPENTELEMETRY=OFF", ] if version.start_with?("4") diff --git a/ext/rcb_views.cxx b/ext/rcb_views.cxx index dcc8ca44..fa92f87c 100644 --- a/ext/rcb_views.cxx +++ b/ext/rcb_views.cxx @@ -15,6 +15,7 @@ * limitations under the License. */ +#define COUCHBASE_CXX_CLIENT_IGNORE_CORE_DEPRECATIONS #include #include #include @@ -22,6 +23,7 @@ #include #include #include +#undef COUCHBASE_CXX_CLIENT_IGNORE_CORE_DEPRECATIONS #include diff --git a/lib/couchbase/bucket.rb b/lib/couchbase/bucket.rb index a782e9c4..4c0701df 100644 --- a/lib/couchbase/bucket.rb +++ b/lib/couchbase/bucket.rb @@ -85,6 +85,10 @@ def default_collection # )) # # @return [ViewResult] + # + # @deprecated Views are deprecated in Couchbase Server 7.0+, and will be removed from a future server version. + # Views are not compatible with the Magma storage engine. Instead of views, use indexes and queries using the + # Index Service (GSI) and the Query Service (SQL++). def view_query(design_document_name, view_name, options = Options::View::DEFAULT) @observability.record_operation(Observability::OP_VIEW_QUERY, opts.parent_span, self, :views) do |_obs_handler| resp = @backend.document_view(@name, design_document_name, view_name, options.namespace, options.to_backend) @@ -110,6 +114,10 @@ def collections end # @return [Management::ViewIndexManager] + # + # @deprecated Views are deprecated in Couchbase Server 7.0+, and will be removed from a future server version. + # Views are not compatible with the Magma storage engine. Instead of views, use indexes and queries using the + # Index Service (GSI) and the Query Service (SQL++). def view_indexes Management::ViewIndexManager.new(@backend, @name, @observability) end diff --git a/lib/couchbase/management/view_index_manager.rb b/lib/couchbase/management/view_index_manager.rb index 387390ea..62acabf1 100644 --- a/lib/couchbase/management/view_index_manager.rb +++ b/lib/couchbase/management/view_index_manager.rb @@ -138,6 +138,10 @@ def initialize(timeout: nil, # All methods (except publish) have a required "namespace" argument indicating whether the operation targets a # development document or a production document. The type of this argument is [Symbol] with allowed values # +:production+ and +:development+. + # + # @deprecated Views are deprecated in Couchbase Server 7.0+, and will be removed from a future server version. + # Views are not compatible with the Magma storage engine. Instead of views, use indexes and queries using the + # Index Service (GSI) and the Query Service (SQL++). class ViewIndexManager alias inspect to_s