couchbase 3.0.1 → 3.0.2

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.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +73 -4
  3. data/ext/build_config.hxx.in +2 -0
  4. data/ext/build_version.hxx.in +11 -8
  5. data/ext/cmake/BuildTracing.cmake +1 -1
  6. data/ext/cmake/CompilerWarnings.cmake +5 -0
  7. data/ext/cmake/Testing.cmake +3 -6
  8. data/ext/couchbase/bucket.hxx +9 -1
  9. data/ext/couchbase/cbsasl/client.h +1 -1
  10. data/ext/couchbase/cluster.hxx +89 -6
  11. data/ext/couchbase/configuration.hxx +2 -0
  12. data/ext/couchbase/couchbase.cxx +1647 -507
  13. data/ext/couchbase/diagnostics.hxx +0 -3
  14. data/ext/couchbase/io/dns_client.hxx +2 -2
  15. data/ext/couchbase/io/http_command.hxx +6 -3
  16. data/ext/couchbase/io/http_session.hxx +14 -18
  17. data/ext/couchbase/io/http_session_manager.hxx +83 -2
  18. data/ext/couchbase/io/mcbp_command.hxx +4 -1
  19. data/ext/couchbase/io/mcbp_context.hxx +37 -0
  20. data/ext/couchbase/io/mcbp_session.hxx +91 -30
  21. data/ext/couchbase/operations.hxx +5 -0
  22. data/ext/couchbase/operations/analytics_dataset_create.hxx +3 -2
  23. data/ext/couchbase/operations/analytics_dataset_drop.hxx +3 -2
  24. data/ext/couchbase/operations/analytics_dataset_get_all.hxx +3 -2
  25. data/ext/couchbase/operations/analytics_dataverse_create.hxx +3 -2
  26. data/ext/couchbase/operations/analytics_dataverse_drop.hxx +3 -2
  27. data/ext/couchbase/operations/analytics_get_pending_mutations.hxx +3 -2
  28. data/ext/couchbase/operations/analytics_index_create.hxx +3 -2
  29. data/ext/couchbase/operations/analytics_index_drop.hxx +3 -2
  30. data/ext/couchbase/operations/analytics_index_get_all.hxx +5 -2
  31. data/ext/couchbase/operations/analytics_link_connect.hxx +3 -2
  32. data/ext/couchbase/operations/analytics_link_disconnect.hxx +3 -2
  33. data/ext/couchbase/operations/bucket_create.hxx +3 -2
  34. data/ext/couchbase/operations/bucket_drop.hxx +3 -2
  35. data/ext/couchbase/operations/bucket_flush.hxx +3 -2
  36. data/ext/couchbase/operations/bucket_get.hxx +3 -2
  37. data/ext/couchbase/operations/bucket_get_all.hxx +3 -2
  38. data/ext/couchbase/operations/bucket_update.hxx +3 -2
  39. data/ext/couchbase/operations/cluster_developer_preview_enable.hxx +3 -2
  40. data/ext/couchbase/operations/collection_create.hxx +3 -2
  41. data/ext/couchbase/operations/collection_drop.hxx +3 -2
  42. data/ext/couchbase/operations/collections_manifest_get.hxx +3 -2
  43. data/ext/couchbase/operations/document_analytics.hxx +3 -2
  44. data/ext/couchbase/operations/document_append.hxx +77 -0
  45. data/ext/couchbase/operations/document_decrement.hxx +3 -2
  46. data/ext/couchbase/operations/document_exists.hxx +3 -2
  47. data/ext/couchbase/operations/document_get.hxx +3 -2
  48. data/ext/couchbase/operations/document_get_and_lock.hxx +3 -2
  49. data/ext/couchbase/operations/document_get_and_touch.hxx +3 -2
  50. data/ext/couchbase/operations/document_get_projected.hxx +3 -2
  51. data/ext/couchbase/operations/document_increment.hxx +3 -2
  52. data/ext/couchbase/operations/document_insert.hxx +3 -2
  53. data/ext/couchbase/operations/document_lookup_in.hxx +8 -2
  54. data/ext/couchbase/operations/document_mutate_in.hxx +13 -2
  55. data/ext/couchbase/operations/document_prepend.hxx +77 -0
  56. data/ext/couchbase/operations/document_query.hxx +3 -2
  57. data/ext/couchbase/operations/document_remove.hxx +5 -2
  58. data/ext/couchbase/operations/document_replace.hxx +3 -2
  59. data/ext/couchbase/operations/document_search.hxx +3 -2
  60. data/ext/couchbase/operations/document_touch.hxx +3 -2
  61. data/ext/couchbase/operations/document_unlock.hxx +3 -2
  62. data/ext/couchbase/operations/document_upsert.hxx +3 -2
  63. data/ext/couchbase/operations/document_view.hxx +3 -2
  64. data/ext/couchbase/operations/group_drop.hxx +3 -2
  65. data/ext/couchbase/operations/group_get.hxx +3 -2
  66. data/ext/couchbase/operations/group_get_all.hxx +3 -2
  67. data/ext/couchbase/operations/group_upsert.hxx +3 -2
  68. data/ext/couchbase/operations/http_noop.hxx +78 -0
  69. data/ext/couchbase/operations/mcbp_noop.hxx +61 -0
  70. data/ext/couchbase/operations/query_index_build_deferred.hxx +3 -2
  71. data/ext/couchbase/operations/query_index_create.hxx +3 -2
  72. data/ext/couchbase/operations/query_index_drop.hxx +3 -2
  73. data/ext/couchbase/operations/query_index_get_all.hxx +3 -2
  74. data/ext/couchbase/operations/role_get_all.hxx +3 -2
  75. data/ext/couchbase/operations/scope_create.hxx +3 -2
  76. data/ext/couchbase/operations/scope_drop.hxx +3 -2
  77. data/ext/couchbase/operations/scope_get_all.hxx +3 -2
  78. data/ext/couchbase/operations/search_get_stats.hxx +3 -2
  79. data/ext/couchbase/operations/search_index_analyze_document.hxx +3 -2
  80. data/ext/couchbase/operations/search_index_control_ingest.hxx +3 -2
  81. data/ext/couchbase/operations/search_index_control_plan_freeze.hxx +3 -2
  82. data/ext/couchbase/operations/search_index_control_query.hxx +3 -2
  83. data/ext/couchbase/operations/search_index_drop.hxx +3 -2
  84. data/ext/couchbase/operations/search_index_get.hxx +3 -2
  85. data/ext/couchbase/operations/search_index_get_all.hxx +3 -2
  86. data/ext/couchbase/operations/search_index_get_documents_count.hxx +3 -2
  87. data/ext/couchbase/operations/search_index_get_stats.hxx +3 -2
  88. data/ext/couchbase/operations/search_index_upsert.hxx +3 -2
  89. data/ext/couchbase/operations/user_drop.hxx +3 -2
  90. data/ext/couchbase/operations/user_get.hxx +3 -2
  91. data/ext/couchbase/operations/user_get_all.hxx +3 -2
  92. data/ext/couchbase/operations/user_upsert.hxx +3 -2
  93. data/ext/couchbase/operations/view_index_drop.hxx +3 -2
  94. data/ext/couchbase/operations/view_index_get.hxx +3 -2
  95. data/ext/couchbase/operations/view_index_get_all.hxx +3 -2
  96. data/ext/couchbase/operations/view_index_upsert.hxx +3 -2
  97. data/ext/couchbase/platform/terminate_handler.cc +5 -2
  98. data/ext/couchbase/protocol/client_opcode.hxx +368 -0
  99. data/ext/couchbase/protocol/cmd_append.hxx +145 -0
  100. data/ext/couchbase/protocol/cmd_hello.hxx +1 -0
  101. data/ext/couchbase/protocol/cmd_lookup_in.hxx +11 -3
  102. data/ext/couchbase/protocol/cmd_mutate_in.hxx +46 -4
  103. data/ext/couchbase/protocol/cmd_noop.hxx +82 -0
  104. data/ext/couchbase/protocol/cmd_prepend.hxx +145 -0
  105. data/ext/couchbase/protocol/durability_level.hxx +16 -0
  106. data/ext/couchbase/protocol/hello_feature.hxx +9 -0
  107. data/ext/couchbase/protocol/unsigned_leb128.h +2 -2
  108. data/ext/couchbase/service_type.hxx +1 -1
  109. data/ext/couchbase/version.hxx +18 -4
  110. data/ext/extconf.rb +9 -6
  111. data/ext/test/CMakeLists.txt +5 -0
  112. data/ext/test/test_helper.hxx +3 -3
  113. data/ext/test/test_helper_native.hxx +2 -5
  114. data/ext/test/test_native_binary_operations.cxx +186 -0
  115. data/ext/test/test_native_diagnostics.cxx +54 -3
  116. data/ext/test/test_ruby_trivial_crud.cxx +1 -1
  117. data/lib/couchbase.rb +1 -0
  118. data/lib/couchbase/analytics_options.rb +1 -71
  119. data/lib/couchbase/binary_collection.rb +60 -22
  120. data/lib/couchbase/binary_collection_options.rb +0 -76
  121. data/lib/couchbase/bucket.rb +40 -36
  122. data/lib/couchbase/cluster.rb +89 -156
  123. data/lib/couchbase/collection.rb +290 -72
  124. data/lib/couchbase/collection_options.rb +30 -243
  125. data/lib/couchbase/datastructures/couchbase_list.rb +5 -16
  126. data/lib/couchbase/datastructures/couchbase_map.rb +5 -16
  127. data/lib/couchbase/datastructures/couchbase_queue.rb +5 -16
  128. data/lib/couchbase/datastructures/couchbase_set.rb +5 -16
  129. data/lib/couchbase/diagnostics.rb +181 -0
  130. data/lib/couchbase/json_transcoder.rb +1 -1
  131. data/lib/couchbase/{common_options.rb → logger.rb} +24 -11
  132. data/lib/couchbase/management/query_index_manager.rb +1 -1
  133. data/lib/couchbase/management/user_manager.rb +3 -0
  134. data/lib/couchbase/options.rb +2094 -0
  135. data/lib/couchbase/query_options.rb +1 -144
  136. data/lib/couchbase/scope.rb +8 -25
  137. data/lib/couchbase/search_options.rb +0 -93
  138. data/lib/couchbase/version.rb +20 -1
  139. data/lib/couchbase/view_options.rb +1 -91
  140. metadata +19 -7
@@ -42,16 +42,17 @@ struct view_index_get_request {
42
42
  std::string document_name;
43
43
  design_document::name_space name_space;
44
44
 
45
- void encode_to(encoded_request_type& encoded, http_context&)
45
+ [[nodiscard]] std::error_code encode_to(encoded_request_type& encoded, http_context&)
46
46
  {
47
47
  encoded.method = "GET";
48
48
  encoded.path =
49
49
  fmt::format("/{}/_design/{}{}", bucket_name, name_space == design_document::name_space::development ? "dev_" : "", document_name);
50
+ return {};
50
51
  }
51
52
  };
52
53
 
53
54
  view_index_get_response
54
- make_response(std::error_code ec, view_index_get_request& request, view_index_get_request::encoded_response_type encoded)
55
+ make_response(std::error_code ec, view_index_get_request& request, view_index_get_request::encoded_response_type&& encoded)
55
56
  {
56
57
  view_index_get_response response{ request.client_context_id, ec };
57
58
  if (!ec) {
@@ -41,15 +41,16 @@ struct view_index_get_all_request {
41
41
  std::string bucket_name;
42
42
  design_document::name_space name_space;
43
43
 
44
- void encode_to(encoded_request_type& encoded, http_context&)
44
+ [[nodiscard]] std::error_code encode_to(encoded_request_type& encoded, http_context&)
45
45
  {
46
46
  encoded.method = "GET";
47
47
  encoded.path = fmt::format("/pools/default/buckets/{}/ddocs", bucket_name);
48
+ return {};
48
49
  }
49
50
  };
50
51
 
51
52
  view_index_get_all_response
52
- make_response(std::error_code ec, view_index_get_all_request& request, view_index_get_all_request::encoded_response_type encoded)
53
+ make_response(std::error_code ec, view_index_get_all_request& request, view_index_get_all_request::encoded_response_type&& encoded)
53
54
  {
54
55
  view_index_get_all_response response{ request.client_context_id, ec };
55
56
  if (!ec) {
@@ -39,7 +39,7 @@ struct view_index_upsert_request {
39
39
  std::string bucket_name;
40
40
  design_document document;
41
41
 
42
- void encode_to(encoded_request_type& encoded, http_context&)
42
+ [[nodiscard]] std::error_code encode_to(encoded_request_type& encoded, http_context&)
43
43
  {
44
44
  tao::json::value body;
45
45
  body["views"] = tao::json::empty_object;
@@ -59,11 +59,12 @@ struct view_index_upsert_request {
59
59
  encoded.path = fmt::format(
60
60
  "/{}/_design/{}{}", bucket_name, document.ns == design_document::name_space::development ? "dev_" : "", document.name);
61
61
  encoded.body = tao::json::to_string(body);
62
+ return {};
62
63
  }
63
64
  };
64
65
 
65
66
  view_index_upsert_response
66
- make_response(std::error_code ec, view_index_upsert_request& request, view_index_upsert_request::encoded_response_type encoded)
67
+ make_response(std::error_code ec, view_index_upsert_request& request, view_index_upsert_request::encoded_response_type&& encoded)
67
68
  {
68
69
  view_index_upsert_response response{ request.client_context_id, ec };
69
70
  if (!ec) {
@@ -81,8 +81,11 @@ log_backtrace()
81
81
  static void
82
82
  backtrace_terminate_handler()
83
83
  {
84
- spdlog::critical("*** Fatal error encountered during exception handling (rev=\"" BACKEND_GIT_REVISION
85
- "\", compiler=\"" BACKEND_CXX_COMPILER "\", system=\"" BACKEND_SYSTEM "\", date=\"" BACKEND_BUILD_TIMESTAMP "\")***");
84
+ spdlog::critical(R"(*** Fatal error encountered during exception handling (rev="{}", compiler="{}", system="{}", date="{}")***)",
85
+ BACKEND_GIT_REVISION,
86
+ BACKEND_CXX_COMPILER,
87
+ BACKEND_SYSTEM,
88
+ BACKEND_BUILD_TIMESTAMP);
86
89
  log_handled_exception();
87
90
 
88
91
  if (should_include_backtrace) {
@@ -29,20 +29,199 @@ enum class client_opcode : uint8_t {
29
29
  remove = 0x04,
30
30
  increment = 0x05,
31
31
  decrement = 0x06,
32
+ noop = 0x0a,
33
+ version = 0x0b,
34
+ append = 0x0e,
35
+ prepend = 0x0f,
36
+ stat = 0x10,
37
+ verbosity = 0x1b,
32
38
  touch = 0x1c,
33
39
  get_and_touch = 0x1d,
34
40
  hello = 0x1f,
35
41
  sasl_list_mechs = 0x20,
36
42
  sasl_auth = 0x21,
37
43
  sasl_step = 0x22,
44
+ get_all_vbucket_seqnos = 0x48,
45
+
46
+ /**
47
+ * Open connection
48
+ * Sent by an external entity to a producer or a consumer to create a logical channel.
49
+ */
50
+ dcp_open = 0x50,
51
+
52
+ /**
53
+ * Add Stream
54
+ * Sent to the consumer to tell the consumer to initiate a stream request with the producer.
55
+ */
56
+ dcp_add_stream = 0x51,
57
+
58
+ /**
59
+ * Close Stream
60
+ * Sent to server controling an DCP stream to close the stream for a named vbucket as soon as possible.
61
+ */
62
+ dcp_close_stream = 0x52,
63
+
64
+ /**
65
+ * Stream Request
66
+ * Sent by the consumer side to the producer specifying that the consumer wants to create a vbucket stream
67
+ */
68
+ dcp_stream_request = 0x53,
69
+
70
+ /**
71
+ * Failover Log Request
72
+ * The Failover log request is used by the consumer to request all known failover ids a client may use to continue from.
73
+ */
74
+ dcp_get_failover_log = 0x54,
75
+
76
+ /**
77
+ * Stream End
78
+ * Sent to the consumer to indicate that the producer has no more messages to stream for the specified vbucket.
79
+ */
80
+ dcp_stream_end = 0x55,
81
+
82
+ /**
83
+ * Snapshot Marker
84
+ * Sent by the producer to tell the consumer that a new snapshot is being sent.
85
+ */
86
+ dcp_snapshot_marker = 0x56,
87
+
88
+ /**
89
+ * Mutation
90
+ * Tells the consumer that the message contains a key mutation.
91
+ */
92
+ dcp_mutation = 0x57,
93
+
94
+ /**
95
+ * Deletion
96
+ * Tells the consumer that the message contains a key deletion.
97
+ */
98
+ dcp_deletion = 0x58,
99
+
100
+ /**
101
+ * Expiration
102
+ * Tells the consumer that the message contains a key expiration
103
+ */
104
+ dcp_expiration = 0x59,
105
+
106
+ /**
107
+ * Set VBucket State
108
+ * The Set VBucket message is used during the VBucket takeover process to hand off ownership of a VBucket between two nodes
109
+ */
110
+ dcp_set_vbucket_state = 0x5b,
111
+
112
+ /**
113
+ * No-Op
114
+ * A No-Op message is sent by the Producer to the Consumer if the Producer has not sent any messages for a given interval of time
115
+ */
116
+ dcp_noop = 0x5c,
117
+
118
+ /**
119
+ * Buffer Acknowledgement
120
+ * Sent to by the Consumer to the Producer in order to inform the Producer that the Consumer has consumed some or all of the data the
121
+ * the Producer has sent and that the Consumer is ready for more data
122
+ */
123
+ dcp_buffer_acknowledgement = 0x5d,
124
+
125
+ /**
126
+ * Control
127
+ * Sent by the Consumer to the Producer in order to configure connection settings.
128
+ */
129
+ dcp_control = 0x5e,
130
+
131
+ /**
132
+ * System Event
133
+ * Tells the consumer that the message contains a system event.
134
+ */
135
+ dcp_system_event = 0x5f,
136
+
137
+ dcp_prepare = 0x60,
138
+ dcp_seqno_acknowledged = 0x61,
139
+ dcp_commit = 0x62,
140
+ dcp_abort = 0x63,
141
+
142
+ /**
143
+ * Seqno Advanced
144
+ * Sent by the producer to tell the consumer that the vbucket seqno has advanced due to an event that the consumer is not subscribed
145
+ * too.
146
+ */
147
+ dcp_seqno_advanced = 0x64,
148
+
149
+ /**
150
+ * OSO Snapshot
151
+ * Sent by the producer to tell the consumer that a Out of Sequence Order snapshot is to be transmitted or has now been completed.
152
+ */
153
+ dcp_oso_snapshot = 0x65,
154
+
155
+ get_replica = 0x83,
156
+ list_buckets = 0x87,
38
157
  select_bucket = 0x89,
158
+ observe_seqno = 0x91,
39
159
  observe = 0x92,
160
+ evict_key = 0x93,
40
161
  get_and_lock = 0x94,
41
162
  unlock = 0x95,
163
+ get_failover_log = 0x96,
164
+
165
+ /**
166
+ * Return the last closed checkpoint Id for a given VBucket.
167
+ */
168
+ last_closed_checkpoint = 0x97,
169
+
170
+ get_meta = 0xa0,
171
+ upsert_with_meta = 0xa2,
172
+ insert_with_meta = 0xa4,
173
+ remove_with_meta = 0xa8,
174
+
175
+ /**
176
+ * Command to create a new checkpoint on a given vbucket by force
177
+ */
178
+ create_checkpoint = 0xaa,
179
+
180
+ /**
181
+ * Command to wait for the checkpoint persistence
182
+ */
183
+ checkpoint_persistence = 0xb1,
184
+
185
+ /**
186
+ * Command that returns meta data for typical memcached ops
187
+ */
188
+ return_meta = 0xb2,
189
+
190
+ get_random_key = 0xb6,
191
+
192
+ /**
193
+ * Command to wait for the dcp sequence number persistence
194
+ */
195
+ seqno_persistence = 0xb7,
196
+
197
+ /**
198
+ * Command to get all keys
199
+ */
200
+ get_keys = 0xb8,
201
+
202
+ /**
203
+ * Command to set collections manifest
204
+ */
205
+ set_collections_manifest = 0xb9,
206
+
207
+ /**
208
+ * Command to get collections manifest
209
+ */
42
210
  get_collections_manifest = 0xba,
211
+
212
+ /**
213
+ * Command to get a collection ID
214
+ */
43
215
  get_collection_id = 0xbb,
216
+
217
+ /**
218
+ * Command to get a scope ID
219
+ */
220
+ get_scope_id = 0xbc,
221
+
44
222
  subdoc_multi_lookup = 0xd0,
45
223
  subdoc_multi_mutation = 0xd1,
224
+
46
225
  get_cluster_config = 0xb5,
47
226
  get_error_map = 0xfe,
48
227
  invalid = 0xff,
@@ -66,6 +245,7 @@ enum class subdoc_opcode : uint8_t {
66
245
  array_add_unique = 0xce,
67
246
  counter = 0xcf,
68
247
  get_count = 0xd2,
248
+ replace_body_with_xattr = 0xd3,
69
249
  };
70
250
 
71
251
  constexpr inline bool
@@ -96,6 +276,52 @@ is_valid_client_opcode(uint8_t code)
96
276
  case client_opcode::increment:
97
277
  case client_opcode::decrement:
98
278
  case client_opcode::get_collection_id:
279
+ case client_opcode::noop:
280
+ case client_opcode::version:
281
+ case client_opcode::append:
282
+ case client_opcode::prepend:
283
+ case client_opcode::stat:
284
+ case client_opcode::verbosity:
285
+ case client_opcode::get_all_vbucket_seqnos:
286
+ case client_opcode::dcp_open:
287
+ case client_opcode::dcp_add_stream:
288
+ case client_opcode::dcp_close_stream:
289
+ case client_opcode::dcp_stream_request:
290
+ case client_opcode::dcp_get_failover_log:
291
+ case client_opcode::dcp_stream_end:
292
+ case client_opcode::dcp_snapshot_marker:
293
+ case client_opcode::dcp_mutation:
294
+ case client_opcode::dcp_deletion:
295
+ case client_opcode::dcp_expiration:
296
+ case client_opcode::dcp_set_vbucket_state:
297
+ case client_opcode::dcp_noop:
298
+ case client_opcode::dcp_buffer_acknowledgement:
299
+ case client_opcode::dcp_control:
300
+ case client_opcode::dcp_system_event:
301
+ case client_opcode::dcp_prepare:
302
+ case client_opcode::dcp_seqno_acknowledged:
303
+ case client_opcode::dcp_commit:
304
+ case client_opcode::dcp_abort:
305
+ case client_opcode::dcp_seqno_advanced:
306
+ case client_opcode::dcp_oso_snapshot:
307
+ case client_opcode::get_replica:
308
+ case client_opcode::list_buckets:
309
+ case client_opcode::observe_seqno:
310
+ case client_opcode::evict_key:
311
+ case client_opcode::get_failover_log:
312
+ case client_opcode::last_closed_checkpoint:
313
+ case client_opcode::get_meta:
314
+ case client_opcode::upsert_with_meta:
315
+ case client_opcode::insert_with_meta:
316
+ case client_opcode::remove_with_meta:
317
+ case client_opcode::create_checkpoint:
318
+ case client_opcode::checkpoint_persistence:
319
+ case client_opcode::return_meta:
320
+ case client_opcode::get_random_key:
321
+ case client_opcode::seqno_persistence:
322
+ case client_opcode::get_keys:
323
+ case client_opcode::set_collections_manifest:
324
+ case client_opcode::get_scope_id:
99
325
  return true;
100
326
  }
101
327
  return false;
@@ -119,6 +345,7 @@ is_valid_subdoc_opcode(uint8_t code)
119
345
  case subdoc_opcode::get_count:
120
346
  case subdoc_opcode::get_doc:
121
347
  case subdoc_opcode::set_doc:
348
+ case subdoc_opcode::replace_body_with_xattr:
122
349
  return true;
123
350
  }
124
351
  return false;
@@ -204,6 +431,144 @@ struct fmt::formatter<couchbase::protocol::client_opcode> : formatter<string_vie
204
431
  case couchbase::protocol::client_opcode::get_collection_id:
205
432
  name = "get_collection_uid (0xbb)";
206
433
  break;
434
+ case couchbase::protocol::client_opcode::noop:
435
+ name = "noop (0x0a)";
436
+ break;
437
+ case couchbase::protocol::client_opcode::version:
438
+ name = "version (0x0b)";
439
+ break;
440
+ case couchbase::protocol::client_opcode::append:
441
+ name = "append (0x0e)";
442
+ break;
443
+ case couchbase::protocol::client_opcode::prepend:
444
+ name = "prepend (0x0f)";
445
+ break;
446
+ case couchbase::protocol::client_opcode::stat:
447
+ name = "stat (0x10)";
448
+ break;
449
+ case couchbase::protocol::client_opcode::verbosity:
450
+ name = "verbosity (0x1b)";
451
+ break;
452
+ case couchbase::protocol::client_opcode::get_all_vbucket_seqnos:
453
+ name = "get_all_vbucket_seqnos (0x48)";
454
+ break;
455
+ case couchbase::protocol::client_opcode::dcp_open:
456
+ name = "dcp_open (0x50)";
457
+ break;
458
+ case couchbase::protocol::client_opcode::dcp_add_stream:
459
+ name = "dcp_add_stream (0x51)";
460
+ break;
461
+ case couchbase::protocol::client_opcode::dcp_close_stream:
462
+ name = "dcp_add_stream (0x52)";
463
+ break;
464
+ case couchbase::protocol::client_opcode::dcp_stream_request:
465
+ name = "dcp_stream_request (0x53)";
466
+ break;
467
+ case couchbase::protocol::client_opcode::dcp_get_failover_log:
468
+ name = "dcp_get_failover_log (0x54)";
469
+ break;
470
+ case couchbase::protocol::client_opcode::dcp_stream_end:
471
+ name = "dcp_stream_end (0x55)";
472
+ break;
473
+ case couchbase::protocol::client_opcode::dcp_snapshot_marker:
474
+ name = "dcp_snapshot_marker (0x56)";
475
+ break;
476
+ case couchbase::protocol::client_opcode::dcp_mutation:
477
+ name = "dcp_mutation (0x57)";
478
+ break;
479
+ case couchbase::protocol::client_opcode::dcp_deletion:
480
+ name = "dcp_deletion (0x58)";
481
+ break;
482
+ case couchbase::protocol::client_opcode::dcp_expiration:
483
+ name = "dcp_expiration (0x59)";
484
+ break;
485
+ case couchbase::protocol::client_opcode::dcp_set_vbucket_state:
486
+ name = "dcp_expiration (0x5b)";
487
+ break;
488
+ case couchbase::protocol::client_opcode::dcp_noop:
489
+ name = "dcp_noop (0x5c)";
490
+ break;
491
+ case couchbase::protocol::client_opcode::dcp_buffer_acknowledgement:
492
+ name = "dcp_buffer_acknowledgement (0x5d)";
493
+ break;
494
+ case couchbase::protocol::client_opcode::dcp_control:
495
+ name = "dcp_control (0x5e)";
496
+ break;
497
+ case couchbase::protocol::client_opcode::dcp_system_event:
498
+ name = "dcp_system_event (0x5f)";
499
+ break;
500
+ case couchbase::protocol::client_opcode::dcp_prepare:
501
+ name = "dcp_prepare (0x60)";
502
+ break;
503
+ case couchbase::protocol::client_opcode::dcp_seqno_acknowledged:
504
+ name = "dcp_seqno_acknowledged (0x61)";
505
+ break;
506
+ case couchbase::protocol::client_opcode::dcp_commit:
507
+ name = "dcp_commit (0x62)";
508
+ break;
509
+ case couchbase::protocol::client_opcode::dcp_abort:
510
+ name = "dcp_abort (0x63)";
511
+ break;
512
+ case couchbase::protocol::client_opcode::dcp_seqno_advanced:
513
+ name = "dcp_seqno_advanced (0x64)";
514
+ break;
515
+ case couchbase::protocol::client_opcode::dcp_oso_snapshot:
516
+ name = "dcp_oso_snapshot (0x65)";
517
+ break;
518
+ case couchbase::protocol::client_opcode::get_replica:
519
+ name = "dcp_get_replica (0x83)";
520
+ break;
521
+ case couchbase::protocol::client_opcode::list_buckets:
522
+ name = "list_buckets (0x87)";
523
+ break;
524
+ case couchbase::protocol::client_opcode::observe_seqno:
525
+ name = "observe_seqno (0x91)";
526
+ break;
527
+ case couchbase::protocol::client_opcode::evict_key:
528
+ name = "evict_key (0x93)";
529
+ break;
530
+ case couchbase::protocol::client_opcode::get_failover_log:
531
+ name = "get_failover_log (0x96)";
532
+ break;
533
+ case couchbase::protocol::client_opcode::last_closed_checkpoint:
534
+ name = "last_closed_checkpoint (0x97)";
535
+ break;
536
+ case couchbase::protocol::client_opcode::get_meta:
537
+ name = "get_meta (0xa0)";
538
+ break;
539
+ case couchbase::protocol::client_opcode::upsert_with_meta:
540
+ name = "upsert_with_meta (0xa2)";
541
+ break;
542
+ case couchbase::protocol::client_opcode::insert_with_meta:
543
+ name = "insert_with_meta (0xa4)";
544
+ break;
545
+ case couchbase::protocol::client_opcode::remove_with_meta:
546
+ name = "remove_with_meta (0xa8)";
547
+ break;
548
+ case couchbase::protocol::client_opcode::create_checkpoint:
549
+ name = "create_checkpoint (0xaa)";
550
+ break;
551
+ case couchbase::protocol::client_opcode::checkpoint_persistence:
552
+ name = "checkpoint_persistence (0xb1)";
553
+ break;
554
+ case couchbase::protocol::client_opcode::return_meta:
555
+ name = "return_meta (0xb2)";
556
+ break;
557
+ case couchbase::protocol::client_opcode::get_random_key:
558
+ name = "get_random_key (0xb6)";
559
+ break;
560
+ case couchbase::protocol::client_opcode::seqno_persistence:
561
+ name = "seqno_persistence (0xb7)";
562
+ break;
563
+ case couchbase::protocol::client_opcode::get_keys:
564
+ name = "get_keys (0xb8)";
565
+ break;
566
+ case couchbase::protocol::client_opcode::set_collections_manifest:
567
+ name = "set_collections_manifest (0xb9)";
568
+ break;
569
+ case couchbase::protocol::client_opcode::get_scope_id:
570
+ name = "get_scope_id (0xbc)";
571
+ break;
207
572
  }
208
573
  return formatter<string_view>::format(name, ctx);
209
574
  }
@@ -258,6 +623,9 @@ struct fmt::formatter<couchbase::protocol::subdoc_opcode> : formatter<string_vie
258
623
  case couchbase::protocol::subdoc_opcode::set_doc:
259
624
  name = "set_doc (0x01)";
260
625
  break;
626
+ case couchbase::protocol::subdoc_opcode::replace_body_with_xattr:
627
+ name = "replace_body_with_xattr (0xd3)";
628
+ break;
261
629
  }
262
630
  return formatter<string_view>::format(name, ctx);
263
631
  }