couchbase 3.5.6 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/ext/cache/extconf_include.rb +3 -3
- data/ext/cache/mozilla-ca-bundle.crt +3 -165
- data/ext/cache/mozilla-ca-bundle.sha256 +1 -1
- data/ext/cache/snappy/{585305c8dbb8f762f2c2e17f937f1cf3ac6cbc9c → 3cde171792b3607f75c14e5011eaf69da4857bd8}/snappy/CMakeLists.txt +14 -10
- data/ext/cache/snappy/{585305c8dbb8f762f2c2e17f937f1cf3ac6cbc9c → 3cde171792b3607f75c14e5011eaf69da4857bd8}/snappy/snappy.cc +7 -4
- data/ext/couchbase/CMakeLists.txt +12 -1
- data/ext/couchbase/cmake/Profiler.cmake +15 -0
- data/ext/couchbase/cmake/ThirdPartyDependencies.cmake +2 -2
- data/ext/couchbase/cmake/couchbase_cxx_client.pc.in +1 -1
- data/ext/couchbase/core/app_telemetry_address.cxx +55 -0
- data/ext/couchbase/core/app_telemetry_address.hxx +39 -0
- data/ext/couchbase/core/app_telemetry_meter.cxx +753 -0
- data/ext/couchbase/core/app_telemetry_meter.hxx +198 -0
- data/ext/couchbase/core/app_telemetry_reporter.cxx +895 -0
- data/ext/couchbase/core/app_telemetry_reporter.hxx +59 -0
- data/ext/couchbase/core/bucket.cxx +77 -35
- data/ext/couchbase/core/bucket.hxx +17 -10
- data/ext/couchbase/core/cluster.cxx +54 -16
- data/ext/couchbase/core/cluster_credentials.cxx +27 -0
- data/ext/couchbase/core/cluster_credentials.hxx +36 -0
- data/ext/couchbase/core/cluster_options.hxx +12 -0
- data/ext/couchbase/core/collections_component.cxx +7 -5
- data/ext/couchbase/core/http_component.cxx +6 -0
- data/ext/couchbase/core/impl/binary_collection.cxx +4 -0
- data/ext/couchbase/core/impl/bucket_manager.cxx +2 -0
- data/ext/couchbase/core/impl/cluster.cxx +9 -0
- data/ext/couchbase/core/impl/collection.cxx +2 -0
- data/ext/couchbase/core/impl/error.cxx +1 -0
- data/ext/couchbase/core/impl/logger.cxx +51 -0
- data/ext/couchbase/core/impl/replica_utils.cxx +1 -1
- data/ext/couchbase/core/impl/transaction_get_multi_replicas_from_preferred_server_group_spec.cxx +32 -0
- data/ext/couchbase/core/impl/transaction_get_multi_spec.cxx +30 -0
- data/ext/couchbase/core/impl/transaction_op_error_category.cxx +2 -0
- data/ext/couchbase/core/io/config_tracker.cxx +6 -6
- data/ext/couchbase/core/io/http_command.hxx +35 -11
- data/ext/couchbase/core/io/http_session.cxx +10 -0
- data/ext/couchbase/core/io/http_session.hxx +4 -0
- data/ext/couchbase/core/io/http_session_manager.hxx +83 -34
- data/ext/couchbase/core/io/mcbp_command.hxx +41 -2
- data/ext/couchbase/core/io/mcbp_session.cxx +52 -19
- data/ext/couchbase/core/io/mcbp_session.hxx +3 -0
- data/ext/couchbase/core/logger/logger.cxx +46 -0
- data/ext/couchbase/core/logger/logger.hxx +41 -1
- data/ext/couchbase/core/management/bucket_settings.hxx +1 -0
- data/ext/couchbase/core/management/bucket_settings_json.hxx +4 -0
- data/ext/couchbase/core/meta/features.hxx +32 -0
- data/ext/couchbase/core/operations/document_analytics.cxx +9 -9
- data/ext/couchbase/core/operations/document_append.cxx +1 -0
- data/ext/couchbase/core/operations/document_append.hxx +1 -0
- data/ext/couchbase/core/operations/document_get_all_replicas.hxx +10 -2
- data/ext/couchbase/core/operations/document_lookup_in.cxx +4 -0
- data/ext/couchbase/core/operations/document_lookup_in_all_replicas.hxx +14 -2
- data/ext/couchbase/core/operations/document_lookup_in_any_replica.hxx +4 -0
- data/ext/couchbase/core/operations/document_mutate_in.cxx +4 -0
- data/ext/couchbase/core/operations/document_mutate_in.hxx +1 -0
- data/ext/couchbase/core/operations/document_prepend.cxx +1 -0
- data/ext/couchbase/core/operations/document_prepend.hxx +1 -0
- data/ext/couchbase/core/operations/document_query.cxx +12 -10
- data/ext/couchbase/core/operations/http_noop.cxx +1 -0
- data/ext/couchbase/core/operations/management/bucket_create.cxx +3 -0
- data/ext/couchbase/core/operations/management/bucket_update.cxx +3 -0
- data/ext/couchbase/core/origin.cxx +0 -5
- data/ext/couchbase/core/origin.hxx +2 -11
- data/ext/couchbase/core/platform/random.cc +6 -3
- data/ext/couchbase/core/platform/random.h +2 -2
- data/ext/couchbase/core/protocol/cmd_mutate_in.hxx +9 -0
- data/ext/couchbase/core/timeout_defaults.hxx +4 -0
- data/ext/couchbase/core/topology/configuration.cxx +10 -13
- data/ext/couchbase/core/topology/configuration.hxx +14 -15
- data/ext/couchbase/core/topology/configuration_json.hxx +6 -0
- data/ext/couchbase/core/transactions/async_attempt_context.hxx +22 -2
- data/ext/couchbase/core/transactions/attempt_context.hxx +25 -7
- data/ext/couchbase/core/transactions/attempt_context_impl.cxx +688 -238
- data/ext/couchbase/core/transactions/attempt_context_impl.hxx +91 -12
- data/ext/couchbase/core/transactions/exceptions.cxx +5 -0
- data/ext/couchbase/core/transactions/exceptions.hxx +20 -0
- data/ext/couchbase/core/transactions/exceptions_fmt.hxx +3 -0
- data/ext/couchbase/core/transactions/forward_compat.cxx +71 -6
- data/ext/couchbase/core/transactions/forward_compat.hxx +45 -59
- data/ext/couchbase/core/transactions/get_multi_orchestrator.cxx +616 -0
- data/ext/couchbase/core/transactions/get_multi_orchestrator.hxx +61 -0
- data/ext/couchbase/core/transactions/internal/doc_record.cxx +8 -0
- data/ext/couchbase/core/transactions/internal/doc_record.hxx +16 -5
- data/ext/couchbase/core/transactions/internal/exceptions_internal.hxx +12 -0
- data/ext/couchbase/core/transactions/internal/transaction_context.hxx +13 -0
- data/ext/couchbase/core/transactions/internal/transaction_fields.hxx +1 -0
- data/ext/couchbase/core/transactions/staged_mutation.cxx +277 -96
- data/ext/couchbase/core/transactions/staged_mutation.hxx +28 -76
- data/ext/couchbase/core/transactions/transaction_context.cxx +33 -0
- data/ext/couchbase/core/transactions/transaction_get_multi_mode.hxx +28 -0
- data/ext/couchbase/core/transactions/transaction_get_multi_replicas_from_preferred_server_group_mode.hxx +27 -0
- data/ext/couchbase/core/transactions/transaction_get_multi_replicas_from_preferred_server_group_result.hxx +71 -0
- data/ext/couchbase/core/transactions/transaction_get_multi_result.hxx +66 -0
- data/ext/couchbase/core/transactions/transaction_links.hxx +10 -0
- data/ext/couchbase/core/transactions/transactions.cxx +8 -3
- data/ext/couchbase/core/utils/connection_string.cxx +4 -0
- data/ext/couchbase/core/utils/url_codec.cxx +26 -0
- data/ext/couchbase/core/utils/url_codec.hxx +11 -0
- data/ext/couchbase/core/websocket_codec.cxx +647 -0
- data/ext/couchbase/core/websocket_codec.hxx +77 -0
- data/ext/couchbase/couchbase/analytics_options.hxx +70 -6
- data/ext/couchbase/couchbase/application_telemetry_options.hxx +124 -0
- data/ext/couchbase/couchbase/cluster_options.hxx +17 -0
- data/ext/couchbase/couchbase/error_codes.hxx +1 -0
- data/ext/couchbase/couchbase/logger.hxx +16 -0
- data/ext/couchbase/couchbase/management/bucket_settings.hxx +1 -0
- data/ext/couchbase/couchbase/query_options.hxx +70 -6
- data/ext/couchbase/couchbase/transactions/async_attempt_context.hxx +29 -5
- data/ext/couchbase/couchbase/transactions/attempt_context.hxx +24 -7
- data/ext/couchbase/couchbase/transactions/transaction_get_multi_mode.hxx +47 -0
- data/ext/couchbase/couchbase/transactions/transaction_get_multi_options.hxx +44 -0
- data/ext/couchbase/couchbase/transactions/transaction_get_multi_replicas_from_preferred_server_group_mode.hxx +46 -0
- data/ext/couchbase/couchbase/transactions/transaction_get_multi_replicas_from_preferred_server_group_options.hxx +48 -0
- data/ext/couchbase/couchbase/transactions/transaction_get_multi_replicas_from_preferred_server_group_result.hxx +109 -0
- data/ext/couchbase/couchbase/transactions/transaction_get_multi_replicas_from_preferred_server_group_spec.hxx +47 -0
- data/ext/couchbase/couchbase/transactions/transaction_get_multi_result.hxx +102 -0
- data/ext/couchbase/couchbase/transactions/transaction_get_multi_spec.hxx +45 -0
- data/ext/extconf.rb +6 -0
- data/ext/rcb_buckets.cxx +26 -0
- data/lib/active_support/cache/couchbase_store.rb +1 -1
- data/lib/couchbase/cluster.rb +1 -1
- data/lib/couchbase/collection.rb +1 -1
- data/lib/couchbase/collection_options.rb +2 -2
- data/lib/couchbase/management/analytics_index_manager.rb +4 -4
- data/lib/couchbase/management/bucket_manager.rb +8 -2
- data/lib/couchbase/protostellar/cluster.rb +2 -2
- data/lib/couchbase/protostellar/collection.rb +1 -1
- data/lib/couchbase/protostellar/management/collection_query_index_manager.rb +1 -1
- data/lib/couchbase/protostellar/request_generator/admin/bucket.rb +4 -4
- data/lib/couchbase/protostellar/request_generator/admin/collection.rb +6 -6
- data/lib/couchbase/protostellar/request_generator/admin/query.rb +13 -13
- data/lib/couchbase/protostellar/request_generator/kv.rb +25 -25
- data/lib/couchbase/protostellar/request_generator/query.rb +4 -4
- data/lib/couchbase/protostellar/request_generator/search.rb +25 -25
- data/lib/couchbase/protostellar/response_converter/search.rb +1 -1
- data/lib/couchbase/protostellar/retry/reason.rb +1 -1
- data/lib/couchbase/protostellar/timeouts.rb +1 -1
- data/lib/couchbase/scope.rb +1 -1
- data/lib/couchbase/transcoder_flags.rb +1 -1
- data/lib/couchbase/utils/stdlib_logger_adapter.rb +1 -1
- data/lib/couchbase/version.rb +1 -1
- metadata +47 -19
- /data/ext/cache/snappy/{585305c8dbb8f762f2c2e17f937f1cf3ac6cbc9c → 3cde171792b3607f75c14e5011eaf69da4857bd8}/snappy/COPYING +0 -0
- /data/ext/cache/snappy/{585305c8dbb8f762f2c2e17f937f1cf3ac6cbc9c → 3cde171792b3607f75c14e5011eaf69da4857bd8}/snappy/cmake/SnappyConfig.cmake.in +0 -0
- /data/ext/cache/snappy/{585305c8dbb8f762f2c2e17f937f1cf3ac6cbc9c → 3cde171792b3607f75c14e5011eaf69da4857bd8}/snappy/cmake/config.h.in +0 -0
- /data/ext/cache/snappy/{585305c8dbb8f762f2c2e17f937f1cf3ac6cbc9c → 3cde171792b3607f75c14e5011eaf69da4857bd8}/snappy/snappy-c.cc +0 -0
- /data/ext/cache/snappy/{585305c8dbb8f762f2c2e17f937f1cf3ac6cbc9c → 3cde171792b3607f75c14e5011eaf69da4857bd8}/snappy/snappy-c.h +0 -0
- /data/ext/cache/snappy/{585305c8dbb8f762f2c2e17f937f1cf3ac6cbc9c → 3cde171792b3607f75c14e5011eaf69da4857bd8}/snappy/snappy-internal.h +0 -0
- /data/ext/cache/snappy/{585305c8dbb8f762f2c2e17f937f1cf3ac6cbc9c → 3cde171792b3607f75c14e5011eaf69da4857bd8}/snappy/snappy-sinksource.cc +0 -0
- /data/ext/cache/snappy/{585305c8dbb8f762f2c2e17f937f1cf3ac6cbc9c → 3cde171792b3607f75c14e5011eaf69da4857bd8}/snappy/snappy-sinksource.h +0 -0
- /data/ext/cache/snappy/{585305c8dbb8f762f2c2e17f937f1cf3ac6cbc9c → 3cde171792b3607f75c14e5011eaf69da4857bd8}/snappy/snappy-stubs-internal.cc +0 -0
- /data/ext/cache/snappy/{585305c8dbb8f762f2c2e17f937f1cf3ac6cbc9c → 3cde171792b3607f75c14e5011eaf69da4857bd8}/snappy/snappy-stubs-internal.h +0 -0
- /data/ext/cache/snappy/{585305c8dbb8f762f2c2e17f937f1cf3ac6cbc9c → 3cde171792b3607f75c14e5011eaf69da4857bd8}/snappy/snappy-stubs-public.h.in +0 -0
- /data/ext/cache/snappy/{585305c8dbb8f762f2c2e17f937f1cf3ac6cbc9c → 3cde171792b3607f75c14e5011eaf69da4857bd8}/snappy/snappy.h +0 -0
@@ -15,11 +15,14 @@
|
|
15
15
|
*/
|
16
16
|
#pragma once
|
17
17
|
|
18
|
-
#include "core/error_context/subdocument_error_context.hxx"
|
19
18
|
#include "core/operations/document_query.hxx"
|
20
|
-
#include "
|
19
|
+
#include "transaction_get_multi_mode.hxx"
|
20
|
+
#include "transaction_get_multi_replicas_from_preferred_server_group_mode.hxx"
|
21
|
+
#include "transaction_get_multi_replicas_from_preferred_server_group_result.hxx"
|
22
|
+
#include "transaction_get_multi_result.hxx"
|
21
23
|
#include "transaction_get_result.hxx"
|
22
24
|
|
25
|
+
// FIXME(SA): remove public API from the core
|
23
26
|
#include <couchbase/transactions/transaction_query_options.hxx>
|
24
27
|
|
25
28
|
#include <optional>
|
@@ -42,6 +45,11 @@ public:
|
|
42
45
|
using QueryCallback =
|
43
46
|
std::function<void(std::exception_ptr, std::optional<core::operations::query_response>)>;
|
44
47
|
|
48
|
+
async_attempt_context() = default;
|
49
|
+
async_attempt_context(async_attempt_context&&) = default;
|
50
|
+
async_attempt_context(const async_attempt_context&) noexcept = default;
|
51
|
+
auto operator=(async_attempt_context&&) -> async_attempt_context& = default;
|
52
|
+
auto operator=(const async_attempt_context&) noexcept -> async_attempt_context& = default;
|
45
53
|
virtual ~async_attempt_context() = default;
|
46
54
|
|
47
55
|
/**
|
@@ -78,6 +86,18 @@ public:
|
|
78
86
|
const core::document_id& id,
|
79
87
|
std::function<void(std::exception_ptr, std::optional<transaction_get_result>)>&& cb) = 0;
|
80
88
|
|
89
|
+
virtual void get_multi(
|
90
|
+
const std::vector<core::document_id>& ids,
|
91
|
+
transaction_get_multi_mode mode,
|
92
|
+
std::function<void(std::exception_ptr, std::optional<transaction_get_multi_result>)>&& cb) = 0;
|
93
|
+
|
94
|
+
virtual void get_multi_replicas_from_preferred_server_group(
|
95
|
+
const std::vector<core::document_id>& ids,
|
96
|
+
transaction_get_multi_replicas_from_preferred_server_group_mode mode,
|
97
|
+
std::function<void(
|
98
|
+
std::exception_ptr,
|
99
|
+
std::optional<transaction_get_multi_replicas_from_preferred_server_group_result>)>&& cb) = 0;
|
100
|
+
|
81
101
|
/**
|
82
102
|
* Mutates the specified document with new content, using the document's last
|
83
103
|
* TransactionDocument#cas().
|
@@ -15,10 +15,14 @@
|
|
15
15
|
*/
|
16
16
|
#pragma once
|
17
17
|
|
18
|
+
#include "core/operations/document_query.hxx"
|
19
|
+
#include "transaction_get_multi_mode.hxx"
|
20
|
+
#include "transaction_get_multi_replicas_from_preferred_server_group_mode.hxx"
|
21
|
+
#include "transaction_get_multi_replicas_from_preferred_server_group_result.hxx"
|
22
|
+
#include "transaction_get_multi_result.hxx"
|
18
23
|
#include "transaction_get_result.hxx"
|
19
24
|
|
20
|
-
|
21
|
-
|
25
|
+
// TODO(SA): remove public API from core interfaces
|
22
26
|
#include <couchbase/transactions/transaction_query_options.hxx>
|
23
27
|
|
24
28
|
#include <optional>
|
@@ -37,7 +41,13 @@ namespace couchbase::core::transactions
|
|
37
41
|
class attempt_context
|
38
42
|
{
|
39
43
|
public:
|
44
|
+
attempt_context() = default;
|
45
|
+
attempt_context(attempt_context&&) noexcept = default;
|
46
|
+
attempt_context(const attempt_context&) = default;
|
47
|
+
auto operator=(attempt_context&&) noexcept -> attempt_context& = default;
|
48
|
+
auto operator=(const attempt_context&) -> attempt_context& = default;
|
40
49
|
virtual ~attempt_context() = default;
|
50
|
+
|
41
51
|
/**
|
42
52
|
* Gets a document from the specified Couchbase collection matching the
|
43
53
|
* specified id.
|
@@ -80,6 +90,14 @@ public:
|
|
80
90
|
virtual auto get_replica_from_preferred_server_group(const core::document_id& id)
|
81
91
|
-> std::optional<transaction_get_result> = 0;
|
82
92
|
|
93
|
+
virtual auto get_multi(const std::vector<core::document_id>& ids, transaction_get_multi_mode mode)
|
94
|
+
-> transaction_get_multi_result = 0;
|
95
|
+
|
96
|
+
virtual auto get_multi_replicas_from_preferred_server_group(
|
97
|
+
const std::vector<core::document_id>& ids,
|
98
|
+
transaction_get_multi_replicas_from_preferred_server_group_mode mode)
|
99
|
+
-> transaction_get_multi_replicas_from_preferred_server_group_result = 0;
|
100
|
+
|
83
101
|
/**
|
84
102
|
* Mutates the specified document with new content, using the document's last
|
85
103
|
* TransactionDocument#cas().
|
@@ -101,8 +119,8 @@ public:
|
|
101
119
|
* @throws transaction_operation_failed which either should not be caught by
|
102
120
|
* the lambda, or rethrown if it is caught.
|
103
121
|
*/
|
104
|
-
virtual auto replace(const transaction_get_result& document,
|
105
|
-
|
122
|
+
virtual auto replace(const transaction_get_result& document, codec::encoded_value content)
|
123
|
+
-> transaction_get_result = 0;
|
106
124
|
|
107
125
|
/**
|
108
126
|
* Inserts a new document into the specified Couchbase collection.
|
@@ -124,8 +142,8 @@ public:
|
|
124
142
|
* @throws transaction_operation_failed which either should not be caught by
|
125
143
|
* the lambda, or rethrown if it is caught.
|
126
144
|
*/
|
127
|
-
virtual auto insert(const core::document_id& id,
|
128
|
-
|
145
|
+
virtual auto insert(const core::document_id& id, codec::encoded_value content)
|
146
|
+
-> transaction_get_result = 0;
|
129
147
|
|
130
148
|
/**
|
131
149
|
* Removes the specified document, using the document's last
|
@@ -157,7 +175,7 @@ public:
|
|
157
175
|
const couchbase::transactions::transaction_query_options& opts,
|
158
176
|
std::optional<std::string> query_context = {}) -> core::operations::query_response
|
159
177
|
{
|
160
|
-
return do_core_query(statement, opts, query_context);
|
178
|
+
return do_core_query(statement, opts, std::move(query_context));
|
161
179
|
};
|
162
180
|
|
163
181
|
/**
|