couchbase 3.7.0 → 3.8.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.
Files changed (286) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/ext/CMakeLists.txt +4 -1
  4. data/ext/cache/extconf_include.rb +4 -3
  5. data/ext/cache/mozilla-ca-bundle.crt +66 -93
  6. data/ext/cache/mozilla-ca-bundle.sha256 +1 -1
  7. data/ext/couchbase/CMakeLists.txt +24 -11
  8. data/ext/couchbase/cmake/APKBUILD.in +17 -1
  9. data/ext/couchbase/cmake/Bundler.cmake +9 -1
  10. data/ext/couchbase/cmake/Cache.cmake +48 -19
  11. data/ext/couchbase/cmake/CompilerOptions.cmake +3 -1
  12. data/ext/couchbase/cmake/OpenSSL.cmake +10 -2
  13. data/ext/couchbase/cmake/Packaging.cmake +48 -8
  14. data/ext/couchbase/cmake/ThirdPartyDependencies.cmake +43 -1
  15. data/ext/couchbase/cmake/build_config.hxx.in +2 -0
  16. data/ext/couchbase/cmake/couchbase-cxx-client.spec.in +18 -0
  17. data/ext/couchbase/cmake/tarball_glob.txt +10 -0
  18. data/ext/couchbase/core/app_telemetry_meter.cxx +1 -0
  19. data/ext/couchbase/core/app_telemetry_reporter.cxx +45 -43
  20. data/ext/couchbase/core/app_telemetry_reporter.hxx +4 -3
  21. data/ext/couchbase/core/bucket.cxx +128 -13
  22. data/ext/couchbase/core/bucket.hxx +12 -2
  23. data/ext/couchbase/core/cluster.cxx +304 -152
  24. data/ext/couchbase/core/cluster.hxx +32 -0
  25. data/ext/couchbase/core/cluster_credentials.cxx +25 -0
  26. data/ext/couchbase/core/cluster_credentials.hxx +5 -0
  27. data/ext/couchbase/core/cluster_label_listener.cxx +72 -0
  28. data/ext/couchbase/core/cluster_label_listener.hxx +46 -0
  29. data/ext/couchbase/core/cluster_options.hxx +4 -0
  30. data/ext/couchbase/core/deprecation_utils.hxx +26 -0
  31. data/ext/couchbase/core/error.hxx +27 -0
  32. data/ext/couchbase/core/free_form_http_request.hxx +0 -2
  33. data/ext/couchbase/core/http_component.cxx +12 -48
  34. data/ext/couchbase/core/impl/analytics.cxx +3 -2
  35. data/ext/couchbase/core/impl/analytics.hxx +2 -1
  36. data/ext/couchbase/core/impl/analytics_index_manager.cxx +249 -137
  37. data/ext/couchbase/core/impl/binary_collection.cxx +134 -58
  38. data/ext/couchbase/core/impl/bucket_manager.cxx +87 -35
  39. data/ext/couchbase/core/impl/collection.cxx +560 -245
  40. data/ext/couchbase/core/impl/collection_manager.cxx +89 -49
  41. data/ext/couchbase/core/impl/dns_srv_tracker.cxx +4 -4
  42. data/ext/couchbase/core/impl/error.cxx +20 -13
  43. data/ext/couchbase/core/impl/error.hxx +15 -10
  44. data/ext/couchbase/core/impl/get_all_replicas.hxx +1 -1
  45. data/ext/couchbase/core/impl/get_any_replica.hxx +2 -1
  46. data/ext/couchbase/core/impl/get_replica.hxx +2 -0
  47. data/ext/couchbase/core/impl/lookup_in_replica.hxx +1 -1
  48. data/ext/couchbase/core/impl/observability_recorder.cxx +161 -0
  49. data/ext/couchbase/core/impl/observability_recorder.hxx +77 -0
  50. data/ext/couchbase/core/impl/observe_seqno.hxx +2 -0
  51. data/ext/couchbase/core/impl/public_bucket.cxx +31 -7
  52. data/ext/couchbase/core/impl/public_cluster.cxx +107 -19
  53. data/ext/couchbase/core/impl/query.cxx +6 -3
  54. data/ext/couchbase/core/impl/query.hxx +3 -1
  55. data/ext/couchbase/core/impl/query_index_manager.cxx +267 -102
  56. data/ext/couchbase/core/impl/scope.cxx +53 -11
  57. data/ext/couchbase/core/impl/search.cxx +8 -4
  58. data/ext/couchbase/core/impl/search.hxx +6 -2
  59. data/ext/couchbase/core/impl/search_index_manager.cxx +131 -41
  60. data/ext/couchbase/core/impl/with_cancellation.hxx +75 -0
  61. data/ext/couchbase/core/io/config_tracker.cxx +9 -9
  62. data/ext/couchbase/core/io/config_tracker.hxx +2 -1
  63. data/ext/couchbase/core/io/http_command.hxx +98 -49
  64. data/ext/couchbase/core/io/http_context.hxx +2 -0
  65. data/ext/couchbase/core/io/http_session.cxx +23 -10
  66. data/ext/couchbase/core/io/http_session.hxx +17 -9
  67. data/ext/couchbase/core/io/http_session_manager.hxx +163 -228
  68. data/ext/couchbase/core/io/http_traits.hxx +0 -7
  69. data/ext/couchbase/core/io/mcbp_command.hxx +123 -44
  70. data/ext/couchbase/core/io/mcbp_session.cxx +251 -26
  71. data/ext/couchbase/core/io/mcbp_session.hxx +9 -1
  72. data/ext/couchbase/core/io/mcbp_traits.hxx +0 -8
  73. data/ext/couchbase/core/io/streams.cxx +3 -3
  74. data/ext/couchbase/core/io/streams.hxx +3 -2
  75. data/ext/couchbase/core/meta/features.hxx +15 -0
  76. data/ext/couchbase/core/meta/version.cxx +13 -0
  77. data/ext/couchbase/core/meta/version.hxx +3 -0
  78. data/ext/couchbase/core/metrics/constants.hxx +23 -0
  79. data/ext/couchbase/core/metrics/logging_meter.cxx +5 -5
  80. data/ext/couchbase/core/metrics/meter_wrapper.cxx +65 -63
  81. data/ext/couchbase/core/metrics/meter_wrapper.hxx +12 -10
  82. data/ext/couchbase/core/operations/document_analytics.hxx +0 -5
  83. data/ext/couchbase/core/operations/document_append.hxx +0 -4
  84. data/ext/couchbase/core/operations/document_decrement.hxx +0 -5
  85. data/ext/couchbase/core/operations/document_exists.hxx +0 -7
  86. data/ext/couchbase/core/operations/document_get.hxx +0 -7
  87. data/ext/couchbase/core/operations/document_get_all_replicas.hxx +77 -27
  88. data/ext/couchbase/core/operations/document_get_and_lock.hxx +0 -9
  89. data/ext/couchbase/core/operations/document_get_and_touch.hxx +0 -9
  90. data/ext/couchbase/core/operations/document_get_any_replica.hxx +83 -2
  91. data/ext/couchbase/core/operations/document_get_projected.hxx +0 -9
  92. data/ext/couchbase/core/operations/document_increment.hxx +0 -5
  93. data/ext/couchbase/core/operations/document_insert.hxx +0 -4
  94. data/ext/couchbase/core/operations/document_lookup_in.hxx +0 -9
  95. data/ext/couchbase/core/operations/document_lookup_in_all_replicas.hxx +46 -4
  96. data/ext/couchbase/core/operations/document_lookup_in_any_replica.hxx +121 -43
  97. data/ext/couchbase/core/operations/document_mutate_in.hxx +0 -5
  98. data/ext/couchbase/core/operations/document_prepend.hxx +0 -4
  99. data/ext/couchbase/core/operations/document_query.hxx +0 -4
  100. data/ext/couchbase/core/operations/document_remove.hxx +0 -4
  101. data/ext/couchbase/core/operations/document_replace.hxx +0 -4
  102. data/ext/couchbase/core/operations/document_search.hxx +0 -7
  103. data/ext/couchbase/core/operations/document_touch.hxx +0 -7
  104. data/ext/couchbase/core/operations/document_unlock.hxx +0 -6
  105. data/ext/couchbase/core/operations/document_upsert.hxx +0 -4
  106. data/ext/couchbase/core/operations/document_view.cxx +2 -0
  107. data/ext/couchbase/core/operations/document_view.hxx +10 -13
  108. data/ext/couchbase/core/operations/http_noop.hxx +2 -0
  109. data/ext/couchbase/core/operations/management/analytics_dataset_create.hxx +2 -0
  110. data/ext/couchbase/core/operations/management/analytics_dataset_drop.hxx +2 -0
  111. data/ext/couchbase/core/operations/management/analytics_dataset_get_all.hxx +2 -0
  112. data/ext/couchbase/core/operations/management/analytics_dataverse_create.hxx +2 -0
  113. data/ext/couchbase/core/operations/management/analytics_dataverse_drop.hxx +2 -0
  114. data/ext/couchbase/core/operations/management/analytics_get_pending_mutations.hxx +2 -0
  115. data/ext/couchbase/core/operations/management/analytics_index_create.hxx +2 -0
  116. data/ext/couchbase/core/operations/management/analytics_index_drop.hxx +2 -0
  117. data/ext/couchbase/core/operations/management/analytics_index_get_all.hxx +2 -0
  118. data/ext/couchbase/core/operations/management/analytics_link_connect.hxx +2 -0
  119. data/ext/couchbase/core/operations/management/analytics_link_create.hxx +2 -0
  120. data/ext/couchbase/core/operations/management/analytics_link_disconnect.hxx +2 -0
  121. data/ext/couchbase/core/operations/management/analytics_link_drop.hxx +2 -0
  122. data/ext/couchbase/core/operations/management/analytics_link_get_all.hxx +2 -0
  123. data/ext/couchbase/core/operations/management/analytics_link_replace.hxx +2 -0
  124. data/ext/couchbase/core/operations/management/bucket_create.hxx +2 -0
  125. data/ext/couchbase/core/operations/management/bucket_describe.hxx +2 -0
  126. data/ext/couchbase/core/operations/management/bucket_drop.hxx +2 -0
  127. data/ext/couchbase/core/operations/management/bucket_flush.hxx +2 -0
  128. data/ext/couchbase/core/operations/management/bucket_get.hxx +2 -0
  129. data/ext/couchbase/core/operations/management/bucket_get_all.hxx +2 -0
  130. data/ext/couchbase/core/operations/management/bucket_update.hxx +2 -0
  131. data/ext/couchbase/core/operations/management/change_password.hxx +2 -0
  132. data/ext/couchbase/core/operations/management/cluster_describe.hxx +2 -0
  133. data/ext/couchbase/core/operations/management/cluster_developer_preview_enable.hxx +2 -0
  134. data/ext/couchbase/core/operations/management/collection_create.hxx +2 -0
  135. data/ext/couchbase/core/operations/management/collection_drop.hxx +2 -0
  136. data/ext/couchbase/core/operations/management/collection_update.hxx +2 -0
  137. data/ext/couchbase/core/operations/management/collections_manifest_get.hxx +2 -0
  138. data/ext/couchbase/core/operations/management/error_utils.cxx +4 -1
  139. data/ext/couchbase/core/operations/management/eventing_deploy_function.hxx +2 -0
  140. data/ext/couchbase/core/operations/management/eventing_drop_function.hxx +2 -0
  141. data/ext/couchbase/core/operations/management/eventing_get_all_functions.hxx +2 -0
  142. data/ext/couchbase/core/operations/management/eventing_get_function.hxx +2 -0
  143. data/ext/couchbase/core/operations/management/eventing_get_status.hxx +2 -0
  144. data/ext/couchbase/core/operations/management/eventing_pause_function.hxx +2 -0
  145. data/ext/couchbase/core/operations/management/eventing_resume_function.hxx +2 -0
  146. data/ext/couchbase/core/operations/management/eventing_undeploy_function.hxx +2 -0
  147. data/ext/couchbase/core/operations/management/eventing_upsert_function.hxx +2 -0
  148. data/ext/couchbase/core/operations/management/freeform.hxx +2 -0
  149. data/ext/couchbase/core/operations/management/group_drop.hxx +2 -0
  150. data/ext/couchbase/core/operations/management/group_get.hxx +2 -0
  151. data/ext/couchbase/core/operations/management/group_get_all.hxx +2 -0
  152. data/ext/couchbase/core/operations/management/group_upsert.hxx +2 -0
  153. data/ext/couchbase/core/operations/management/query_index_build.hxx +2 -0
  154. data/ext/couchbase/core/operations/management/query_index_build_deferred.hxx +68 -30
  155. data/ext/couchbase/core/operations/management/query_index_create.hxx +2 -0
  156. data/ext/couchbase/core/operations/management/query_index_drop.hxx +2 -0
  157. data/ext/couchbase/core/operations/management/query_index_get_all.hxx +4 -3
  158. data/ext/couchbase/core/operations/management/query_index_get_all_deferred.hxx +2 -1
  159. data/ext/couchbase/core/operations/management/role_get_all.hxx +2 -0
  160. data/ext/couchbase/core/operations/management/scope_create.hxx +2 -0
  161. data/ext/couchbase/core/operations/management/scope_drop.hxx +2 -0
  162. data/ext/couchbase/core/operations/management/scope_get_all.hxx +2 -0
  163. data/ext/couchbase/core/operations/management/search_get_stats.hxx +2 -0
  164. data/ext/couchbase/core/operations/management/search_index_analyze_document.hxx +2 -0
  165. data/ext/couchbase/core/operations/management/search_index_control_ingest.hxx +2 -0
  166. data/ext/couchbase/core/operations/management/search_index_control_plan_freeze.hxx +2 -0
  167. data/ext/couchbase/core/operations/management/search_index_control_query.hxx +2 -0
  168. data/ext/couchbase/core/operations/management/search_index_drop.hxx +2 -0
  169. data/ext/couchbase/core/operations/management/search_index_get.hxx +2 -0
  170. data/ext/couchbase/core/operations/management/search_index_get_all.hxx +2 -0
  171. data/ext/couchbase/core/operations/management/search_index_get_documents_count.hxx +2 -0
  172. data/ext/couchbase/core/operations/management/search_index_get_stats.hxx +2 -0
  173. data/ext/couchbase/core/operations/management/search_index_upsert.hxx +2 -0
  174. data/ext/couchbase/core/operations/management/user_drop.hxx +2 -0
  175. data/ext/couchbase/core/operations/management/user_get.hxx +2 -0
  176. data/ext/couchbase/core/operations/management/user_get_all.hxx +2 -0
  177. data/ext/couchbase/core/operations/management/user_upsert.hxx +2 -0
  178. data/ext/couchbase/core/operations/management/view_index_drop.hxx +2 -0
  179. data/ext/couchbase/core/operations/management/view_index_get.hxx +2 -0
  180. data/ext/couchbase/core/operations/management/view_index_get_all.hxx +2 -0
  181. data/ext/couchbase/core/operations/management/view_index_upsert.hxx +2 -0
  182. data/ext/couchbase/core/operations/operation_traits.hxx +6 -0
  183. data/ext/couchbase/core/operations.hxx +0 -1
  184. data/ext/couchbase/core/operations_fwd.hxx +8 -0
  185. data/ext/couchbase/core/origin.cxx +67 -12
  186. data/ext/couchbase/core/origin.hxx +13 -8
  187. data/ext/couchbase/core/orphan_reporter.cxx +164 -0
  188. data/ext/couchbase/core/orphan_reporter.hxx +65 -0
  189. data/ext/couchbase/core/sasl/CMakeLists.txt +1 -0
  190. data/ext/couchbase/core/sasl/client.cc +6 -0
  191. data/ext/couchbase/core/sasl/mechanism.cc +2 -1
  192. data/ext/couchbase/core/sasl/mechanism.h +2 -1
  193. data/ext/couchbase/core/sasl/oauthbearer/oauthbearer.cc +41 -0
  194. data/ext/couchbase/core/sasl/oauthbearer/oauthbearer.h +47 -0
  195. data/ext/couchbase/core/tls_context_provider.cxx +44 -0
  196. data/ext/couchbase/core/tls_context_provider.hxx +44 -0
  197. data/ext/couchbase/core/tracing/attribute_helpers.hxx +45 -0
  198. data/ext/couchbase/core/tracing/constants.hxx +148 -68
  199. data/ext/couchbase/core/tracing/threshold_logging_options.hxx +0 -3
  200. data/ext/couchbase/core/tracing/threshold_logging_tracer.cxx +122 -170
  201. data/ext/couchbase/core/tracing/tracer_wrapper.cxx +17 -24
  202. data/ext/couchbase/core/tracing/tracer_wrapper.hxx +8 -10
  203. data/ext/couchbase/core/tracing/wrapper_sdk_tracer.cxx +114 -0
  204. data/ext/couchbase/core/tracing/wrapper_sdk_tracer.hxx +85 -0
  205. data/ext/couchbase/core/transactions/attempt_context_impl.cxx +16 -14
  206. data/ext/couchbase/core/transactions/attempt_context_impl.hxx +4 -4
  207. data/ext/couchbase/core/transactions/transactions.cxx +1 -1
  208. data/ext/couchbase/core/transactions/transactions_cleanup.cxx +1 -2
  209. data/ext/couchbase/core/utils/byteswap.hxx +12 -0
  210. data/ext/couchbase/core/utils/concurrent_fixed_priority_queue.hxx +102 -0
  211. data/ext/couchbase/core/utils/connection_string.cxx +2 -0
  212. data/ext/couchbase/couchbase/certificate_authenticator.hxx +1 -0
  213. data/ext/couchbase/couchbase/cluster.hxx +47 -0
  214. data/ext/couchbase/couchbase/cluster_options.hxx +16 -0
  215. data/ext/couchbase/couchbase/collection.hxx +60 -15
  216. data/ext/couchbase/couchbase/error_codes.hxx +48 -48
  217. data/ext/couchbase/couchbase/jwt_authenticator.hxx +52 -0
  218. data/ext/couchbase/couchbase/metrics/meter.hxx +2 -1
  219. data/ext/couchbase/couchbase/metrics/otel_meter.hxx +75 -80
  220. data/ext/couchbase/couchbase/network_options.hxx +19 -0
  221. data/ext/couchbase/couchbase/password_authenticator.hxx +1 -0
  222. data/ext/couchbase/couchbase/tracing/otel_tracer.hxx +15 -17
  223. data/ext/couchbase/couchbase/tracing/request_span.hxx +2 -2
  224. data/ext/couchbase.cxx +4 -0
  225. data/ext/extconf.rb +1 -0
  226. data/ext/rcb_analytics.cxx +157 -47
  227. data/ext/rcb_backend.cxx +118 -71
  228. data/ext/rcb_buckets.cxx +39 -16
  229. data/ext/rcb_collections.cxx +36 -12
  230. data/ext/rcb_crud.cxx +587 -294
  231. data/ext/rcb_hdr_histogram.cxx +219 -0
  232. data/ext/rcb_hdr_histogram.hxx +28 -0
  233. data/ext/rcb_multi.cxx +142 -59
  234. data/ext/rcb_observability.cxx +132 -0
  235. data/ext/rcb_observability.hxx +49 -0
  236. data/ext/rcb_query.cxx +77 -27
  237. data/ext/rcb_search.cxx +92 -31
  238. data/ext/rcb_users.cxx +69 -26
  239. data/ext/rcb_utils.cxx +91 -0
  240. data/ext/rcb_utils.hxx +141 -168
  241. data/ext/rcb_views.cxx +36 -12
  242. data/lib/active_support/cache/couchbase_store.rb +6 -6
  243. data/lib/couchbase/authenticator.rb +14 -0
  244. data/lib/couchbase/binary_collection.rb +37 -22
  245. data/lib/couchbase/bucket.rb +46 -31
  246. data/lib/couchbase/cluster.rb +146 -61
  247. data/lib/couchbase/collection.rb +257 -186
  248. data/lib/couchbase/datastructures/couchbase_list.rb +81 -50
  249. data/lib/couchbase/datastructures/couchbase_map.rb +86 -50
  250. data/lib/couchbase/datastructures/couchbase_queue.rb +64 -38
  251. data/lib/couchbase/datastructures/couchbase_set.rb +57 -41
  252. data/lib/couchbase/deprecations.rb +1 -1
  253. data/lib/couchbase/diagnostics.rb +8 -8
  254. data/lib/couchbase/errors.rb +6 -0
  255. data/lib/couchbase/management/analytics_index_manager.rb +90 -59
  256. data/lib/couchbase/management/bucket_manager.rb +73 -45
  257. data/lib/couchbase/management/collection_manager.rb +86 -43
  258. data/lib/couchbase/management/collection_query_index_manager.rb +56 -33
  259. data/lib/couchbase/management/query_index_manager.rb +88 -36
  260. data/lib/couchbase/management/scope_search_index_manager.rb +119 -52
  261. data/lib/couchbase/management/search_index_manager.rb +401 -178
  262. data/lib/couchbase/management/user_manager.rb +343 -174
  263. data/lib/couchbase/management/view_index_manager.rb +166 -73
  264. data/lib/couchbase/metrics/logging_meter.rb +108 -0
  265. data/lib/couchbase/metrics/logging_value_recorder.rb +50 -0
  266. data/lib/couchbase/metrics/meter.rb +27 -0
  267. data/lib/couchbase/metrics/noop_meter.rb +30 -0
  268. data/lib/couchbase/metrics/noop_value_recorder.rb +27 -0
  269. data/lib/couchbase/metrics/value_recorder.rb +25 -0
  270. data/lib/couchbase/options.rb +69 -3
  271. data/lib/couchbase/protostellar/cluster.rb +3 -0
  272. data/lib/couchbase/scope.rb +62 -48
  273. data/lib/couchbase/search_options.rb +18 -18
  274. data/lib/couchbase/tracing/noop_span.rb +29 -0
  275. data/lib/couchbase/tracing/noop_tracer.rb +29 -0
  276. data/lib/couchbase/tracing/request_span.rb +34 -0
  277. data/lib/couchbase/tracing/request_tracer.rb +28 -0
  278. data/lib/couchbase/tracing/threshold_logging_span.rb +112 -0
  279. data/lib/couchbase/tracing/threshold_logging_tracer.rb +231 -0
  280. data/lib/couchbase/utils/hdr_histogram.rb +55 -0
  281. data/lib/couchbase/utils/observability.rb +257 -0
  282. data/lib/couchbase/utils/observability_constants.rb +200 -0
  283. data/lib/couchbase/utils/stdlib_logger_adapter.rb +1 -3
  284. data/lib/couchbase/version.rb +1 -1
  285. data/lib/couchbase.rb +2 -2
  286. metadata +58 -6
@@ -17,14 +17,17 @@
17
17
 
18
18
  #pragma once
19
19
 
20
+ #include <couchbase/error_codes.hxx>
21
+
20
22
  #include "core/error_context/key_value.hxx"
21
23
  #include "core/impl/get_replica.hxx"
22
24
  #include "core/impl/replica_utils.hxx"
23
25
  #include "core/logger/logger.hxx"
24
26
  #include "core/operations/document_get.hxx"
25
27
  #include "core/operations/operation_traits.hxx"
28
+ #include "core/public_fwd.hxx"
29
+ #include "core/tracing/constants.hxx"
26
30
  #include "core/utils/movable_function.hxx"
27
- #include "couchbase/error_codes.hxx"
28
31
 
29
32
  #include <memory>
30
33
  #include <mutex>
@@ -54,6 +57,7 @@ struct get_all_replicas_request {
54
57
  core::document_id id;
55
58
  std::optional<std::chrono::milliseconds> timeout{};
56
59
  couchbase::read_preference read_preference{ couchbase::read_preference::no_preference };
60
+ std::shared_ptr<couchbase::tracing::request_span> parent_span{ nullptr };
57
61
 
58
62
  template<typename Core, typename Handler>
59
63
  void execute(Core core, Handler handler)
@@ -64,6 +68,7 @@ struct get_all_replicas_request {
64
68
  id = id,
65
69
  timeout = timeout,
66
70
  read_preference = read_preference,
71
+ parent_span = std::move(parent_span),
67
72
  h = std::forward<Handler>(handler)](
68
73
  std::error_code ec, std::shared_ptr<topology::configuration> config) mutable {
69
74
  if (ec) {
@@ -104,11 +109,40 @@ struct get_all_replicas_request {
104
109
  auto ctx = std::make_shared<replica_context>(std::move(h), nodes.size());
105
110
 
106
111
  for (const auto& node : nodes) {
112
+ auto subop_span = core->tracer()->create_span(
113
+ node.is_replica ? tracing::operation::mcbp_get_replica : tracing::operation::mcbp_get,
114
+ parent_span);
115
+
116
+ if (subop_span->uses_tags()) {
117
+ subop_span->add_tag(tracing::attributes::op::service, tracing::service::key_value);
118
+ subop_span->add_tag(tracing::attributes::op::operation_name,
119
+ node.is_replica ? tracing::operation::mcbp_get_replica
120
+ : tracing::operation::mcbp_get);
121
+ subop_span->add_tag(tracing::attributes::op::bucket_name, id.bucket());
122
+ subop_span->add_tag(tracing::attributes::op::scope_name, id.scope());
123
+ subop_span->add_tag(tracing::attributes::op::collection_name, id.collection());
124
+ }
125
+
107
126
  if (node.is_replica) {
108
127
  document_id replica_id{ id };
109
128
  replica_id.node_index(node.index);
110
129
  core->execute(
111
- impl::get_replica_request{ std::move(replica_id), timeout }, [ctx](auto&& resp) {
130
+ impl::get_replica_request{
131
+ std::move(replica_id),
132
+ timeout,
133
+ {},
134
+ {},
135
+ {},
136
+ subop_span,
137
+ },
138
+ [ctx, subop_span](auto&& resp) {
139
+ {
140
+ if (subop_span->uses_tags()) {
141
+ subop_span->add_tag(tracing::attributes::op::retry_count,
142
+ resp.ctx.retry_attempts());
143
+ }
144
+ subop_span->end();
145
+ }
112
146
  handler_type local_handler{};
113
147
  {
114
148
  std::scoped_lock lock(ctx->mutex_);
@@ -139,36 +173,52 @@ struct get_all_replicas_request {
139
173
  }
140
174
  });
141
175
  } else {
142
- core->execute(get_request{ document_id{ id }, {}, {}, timeout }, [ctx](auto&& resp) {
143
- handler_type local_handler{};
144
- {
145
- std::scoped_lock lock(ctx->mutex_);
146
- if (ctx->done_) {
147
- return;
176
+ core->execute(
177
+ get_request{
178
+ document_id{ id },
179
+ {},
180
+ {},
181
+ timeout,
182
+ {},
183
+ subop_span,
184
+ },
185
+ [ctx, subop_span](auto&& resp) {
186
+ {
187
+ if (subop_span->uses_tags()) {
188
+ subop_span->add_tag(tracing::attributes::op::retry_count,
189
+ resp.ctx.retry_attempts());
190
+ }
191
+ subop_span->end();
148
192
  }
149
- --ctx->expected_responses_;
150
- if (resp.ctx.ec()) {
151
- if (ctx->expected_responses_ > 0) {
152
- // just ignore the response
193
+ handler_type local_handler{};
194
+ {
195
+ std::scoped_lock lock(ctx->mutex_);
196
+ if (ctx->done_) {
153
197
  return;
154
198
  }
155
- } else {
156
- ctx->result_.emplace_back(get_all_replicas_response::entry{
157
- std::move(resp.value), resp.cas, resp.flags, false /* active */ });
158
- }
159
- if (ctx->expected_responses_ == 0) {
160
- ctx->done_ = true;
161
- std::swap(local_handler, ctx->handler_);
199
+ --ctx->expected_responses_;
200
+ if (resp.ctx.ec()) {
201
+ if (ctx->expected_responses_ > 0) {
202
+ // just ignore the response
203
+ return;
204
+ }
205
+ } else {
206
+ ctx->result_.emplace_back(get_all_replicas_response::entry{
207
+ std::move(resp.value), resp.cas, resp.flags, false /* active */ });
208
+ }
209
+ if (ctx->expected_responses_ == 0) {
210
+ ctx->done_ = true;
211
+ std::swap(local_handler, ctx->handler_);
212
+ }
162
213
  }
163
- }
164
- if (local_handler) {
165
- if (ctx->result_.empty()) {
166
- // Return an error only when we have no results from any replica.
167
- return local_handler({ std::move(resp.ctx), {} });
214
+ if (local_handler) {
215
+ if (ctx->result_.empty()) {
216
+ // Return an error only when we have no results from any replica.
217
+ return local_handler({ std::move(resp.ctx), {} });
218
+ }
219
+ return local_handler({ {}, std::move(ctx->result_) });
168
220
  }
169
- return local_handler({ {}, std::move(ctx->result_) });
170
- }
171
- });
221
+ });
172
222
  }
173
223
  }
174
224
  });
@@ -58,13 +58,4 @@ struct get_and_lock_request {
58
58
  const encoded_response_type& encoded) const
59
59
  -> get_and_lock_response;
60
60
  };
61
-
62
61
  } // namespace couchbase::core::operations
63
-
64
- namespace couchbase::core::io::mcbp_traits
65
- {
66
- template<>
67
- struct supports_parent_span<couchbase::core::operations::get_and_lock_request>
68
- : public std::true_type {
69
- };
70
- } // namespace couchbase::core::io::mcbp_traits
@@ -59,13 +59,4 @@ struct get_and_touch_request {
59
59
  const encoded_response_type& encoded) const
60
60
  -> get_and_touch_response;
61
61
  };
62
-
63
62
  } // namespace couchbase::core::operations
64
-
65
- namespace couchbase::core::io::mcbp_traits
66
- {
67
- template<>
68
- struct supports_parent_span<couchbase::core::operations::get_and_touch_request>
69
- : public std::true_type {
70
- };
71
- } // namespace couchbase::core::io::mcbp_traits
@@ -20,6 +20,7 @@
20
20
  #include "core/error_context/key_value.hxx"
21
21
  #include "core/impl/get_replica.hxx"
22
22
  #include "core/impl/replica_utils.hxx"
23
+ #include "core/impl/with_cancellation.hxx"
23
24
  #include "core/operations/document_get.hxx"
24
25
  #include "core/operations/operation_traits.hxx"
25
26
  #include "core/utils/movable_function.hxx"
@@ -51,6 +52,7 @@ struct get_any_replica_request {
51
52
  core::document_id id;
52
53
  std::optional<std::chrono::milliseconds> timeout{};
53
54
  couchbase::read_preference read_preference{ couchbase::read_preference::no_preference };
55
+ std::shared_ptr<couchbase::tracing::request_span> parent_span{ nullptr };
54
56
 
55
57
  template<typename Core, typename Handler>
56
58
  void execute(Core core, Handler handler)
@@ -61,6 +63,7 @@ struct get_any_replica_request {
61
63
  id = id,
62
64
  timeout = timeout,
63
65
  read_preference = read_preference,
66
+ parent_span = std::move(parent_span),
64
67
  h = std::forward<Handler>(handler)](
65
68
  std::error_code ec, std::shared_ptr<topology::configuration> config) mutable {
66
69
  const auto [e, origin] = core->origin();
@@ -91,20 +94,71 @@ struct get_any_replica_request {
91
94
  {
92
95
  }
93
96
 
97
+ void add_cancellation_token(std::shared_ptr<impl::cancellation_token> token)
98
+ {
99
+ std::scoped_lock<std::mutex> lock(cancel_tokens_mutex_);
100
+ cancel_tokens_.emplace_back(std::move(token));
101
+ }
102
+
103
+ auto get_cancellation_tokens() -> std::vector<std::shared_ptr<impl::cancellation_token>>
104
+ {
105
+ std::vector<std::shared_ptr<impl::cancellation_token>> tokens{};
106
+ {
107
+ std::scoped_lock<std::mutex> lock(cancel_tokens_mutex_);
108
+ std::swap(tokens, cancel_tokens_);
109
+ }
110
+ return tokens;
111
+ }
112
+
94
113
  handler_type handler_;
95
114
  std::size_t expected_responses_;
96
115
  bool done_{ false };
97
116
  std::mutex mutex_{};
117
+ std::vector<std::shared_ptr<impl::cancellation_token>> cancel_tokens_{};
118
+ std::mutex cancel_tokens_mutex_{};
98
119
  };
99
120
  auto ctx = std::make_shared<replica_context>(std::move(h), nodes.size());
100
121
 
101
122
  for (const auto& node : nodes) {
123
+ auto subop_span = core->tracer()->create_span(
124
+ node.is_replica ? tracing::operation::mcbp_get_replica : tracing::operation::mcbp_get,
125
+ parent_span);
126
+
127
+ if (subop_span->uses_tags()) {
128
+ subop_span->add_tag(tracing::attributes::op::service, tracing::service::key_value);
129
+ subop_span->add_tag(tracing::attributes::op::operation_name,
130
+ node.is_replica ? tracing::operation::mcbp_get_replica
131
+ : tracing::operation::mcbp_get);
132
+ subop_span->add_tag(tracing::attributes::op::bucket_name, id.bucket());
133
+ subop_span->add_tag(tracing::attributes::op::scope_name, id.scope());
134
+ subop_span->add_tag(tracing::attributes::op::collection_name, id.collection());
135
+ }
136
+
102
137
  if (node.is_replica) {
103
138
  document_id replica_id{ id };
104
139
  replica_id.node_index(node.index);
140
+ impl::with_cancellation<impl::get_replica_request> req{
141
+ {
142
+ std::move(replica_id),
143
+ timeout,
144
+ {},
145
+ {},
146
+ {},
147
+ subop_span,
148
+ },
149
+ };
150
+ ctx->add_cancellation_token(req.cancel_token);
105
151
  core->execute(
106
- impl::get_replica_request{ std::move(replica_id), timeout }, [ctx](auto&& resp) {
152
+ std::move(req), [ctx, subop_span](auto&& resp) {
153
+ {
154
+ if (subop_span->uses_tags()) {
155
+ subop_span->add_tag(tracing::attributes::op::retry_count,
156
+ resp.ctx.retry_attempts());
157
+ }
158
+ subop_span->end();
159
+ }
107
160
  handler_type local_handler;
161
+ std::vector<std::shared_ptr<impl::cancellation_token>> cancel_tokens;
108
162
  {
109
163
  std::scoped_lock lock(ctx->mutex_);
110
164
  if (ctx->done_) {
@@ -121,6 +175,10 @@ struct get_any_replica_request {
121
175
  }
122
176
  ctx->done_ = true;
123
177
  std::swap(local_handler, ctx->handler_);
178
+ cancel_tokens = ctx->get_cancellation_tokens();
179
+ }
180
+ for (const auto& token : cancel_tokens) {
181
+ token->cancel();
124
182
  }
125
183
  if (local_handler) {
126
184
  return local_handler(response_type{
@@ -128,8 +186,27 @@ struct get_any_replica_request {
128
186
  }
129
187
  });
130
188
  } else {
131
- core->execute(get_request{ id, {}, {}, timeout }, [ctx](auto&& resp) {
189
+ impl::with_cancellation<get_request> req{
190
+ {
191
+ id,
192
+ {},
193
+ {},
194
+ timeout,
195
+ {},
196
+ subop_span,
197
+ },
198
+ };
199
+ ctx->add_cancellation_token(req.cancel_token);
200
+ core->execute(std::move(req), [ctx, subop_span](auto&& resp) {
201
+ {
202
+ if (subop_span->uses_tags()) {
203
+ subop_span->add_tag(tracing::attributes::op::retry_count,
204
+ resp.ctx.retry_attempts());
205
+ }
206
+ subop_span->end();
207
+ }
132
208
  handler_type local_handler{};
209
+ std::vector<std::shared_ptr<impl::cancellation_token>> cancel_tokens;
133
210
  {
134
211
  std::scoped_lock lock(ctx->mutex_);
135
212
  if (ctx->done_) {
@@ -146,6 +223,10 @@ struct get_any_replica_request {
146
223
  }
147
224
  ctx->done_ = true;
148
225
  std::swap(local_handler, ctx->handler_);
226
+ cancel_tokens = ctx->get_cancellation_tokens();
227
+ }
228
+ for (const auto& token : cancel_tokens) {
229
+ token->cancel();
149
230
  }
150
231
  if (local_handler) {
151
232
  return local_handler(response_type{
@@ -62,13 +62,4 @@ struct get_projected_request {
62
62
  const encoded_response_type& encoded) const
63
63
  -> get_projected_response;
64
64
  };
65
-
66
65
  } // namespace couchbase::core::operations
67
-
68
- namespace couchbase::core::io::mcbp_traits
69
- {
70
- template<>
71
- struct supports_parent_span<couchbase::core::operations::get_projected_request>
72
- : public std::true_type {
73
- };
74
- } // namespace couchbase::core::io::mcbp_traits
@@ -79,9 +79,4 @@ namespace couchbase::core::io::mcbp_traits
79
79
  template<>
80
80
  struct supports_durability<couchbase::core::operations::increment_request> : public std::true_type {
81
81
  };
82
-
83
- template<>
84
- struct supports_parent_span<couchbase::core::operations::increment_request>
85
- : public std::true_type {
86
- };
87
82
  } // namespace couchbase::core::io::mcbp_traits
@@ -77,8 +77,4 @@ namespace couchbase::core::io::mcbp_traits
77
77
  template<>
78
78
  struct supports_durability<couchbase::core::operations::insert_request> : public std::true_type {
79
79
  };
80
-
81
- template<>
82
- struct supports_parent_span<couchbase::core::operations::insert_request> : public std::true_type {
83
- };
84
80
  } // namespace couchbase::core::io::mcbp_traits
@@ -72,13 +72,4 @@ struct lookup_in_request {
72
72
  const encoded_response_type& encoded) const
73
73
  -> lookup_in_response;
74
74
  };
75
-
76
75
  } // namespace couchbase::core::operations
77
- namespace couchbase::core::io::mcbp_traits
78
- {
79
-
80
- template<>
81
- struct supports_parent_span<couchbase::core::operations::lookup_in_request>
82
- : public std::true_type {
83
- };
84
- } // namespace couchbase::core::io::mcbp_traits
@@ -23,6 +23,7 @@
23
23
  #include "core/impl/subdoc/command.hxx"
24
24
  #include "core/operations/document_lookup_in.hxx"
25
25
  #include "core/operations/operation_traits.hxx"
26
+ #include "core/tracing/constants.hxx"
26
27
  #include "core/utils/movable_function.hxx"
27
28
 
28
29
  #include <couchbase/codec/encoded_value.hxx>
@@ -152,14 +153,39 @@ struct lookup_in_all_replicas_request {
152
153
  auto ctx = std::make_shared<replica_context>(std::move(h), nodes.size());
153
154
 
154
155
  for (const auto& node : nodes) {
156
+ auto subop_span = core->tracer()->create_span(
157
+ node.is_replica ? tracing::operation::mcbp_lookup_in_replica
158
+ : tracing::operation::mcbp_lookup_in,
159
+ parent_span);
160
+
161
+ if (subop_span->uses_tags()) {
162
+ subop_span->add_tag(tracing::attributes::op::service, tracing::service::key_value);
163
+ subop_span->add_tag(tracing::attributes::op::operation_name,
164
+ node.is_replica ? tracing::operation::mcbp_lookup_in_replica
165
+ : tracing::operation::mcbp_lookup_in);
166
+ subop_span->add_tag(tracing::attributes::op::bucket_name, id.bucket());
167
+ subop_span->add_tag(tracing::attributes::op::scope_name, id.scope());
168
+ subop_span->add_tag(tracing::attributes::op::collection_name, id.collection());
169
+ }
170
+
155
171
  if (node.is_replica) {
156
172
  document_id replica_id{ id };
157
173
  replica_id.node_index(node.index);
158
174
  auto replica_req = impl::lookup_in_replica_request{
159
- std::move(replica_id), specs, timeout, parent_span
175
+ std::move(replica_id),
176
+ specs,
177
+ timeout,
178
+ subop_span,
160
179
  };
161
180
  replica_req.access_deleted = access_deleted;
162
- core->execute(replica_req, [ctx](auto&& resp) {
181
+ core->execute(replica_req, [ctx, subop_span](auto&& resp) {
182
+ {
183
+ if (subop_span->uses_tags()) {
184
+ subop_span->add_tag(tracing::attributes::op::retry_count,
185
+ resp.ctx.retry_attempts());
186
+ }
187
+ subop_span->end();
188
+ }
163
189
  handler_type local_handler{};
164
190
  {
165
191
  std::scoped_lock lock(ctx->mutex_);
@@ -206,8 +232,24 @@ struct lookup_in_all_replicas_request {
206
232
  });
207
233
  } else {
208
234
  core->execute(
209
- lookup_in_request{ document_id{ id }, {}, {}, false, specs, timeout },
210
- [ctx](auto&& resp) {
235
+ lookup_in_request{
236
+ document_id{ id },
237
+ {},
238
+ {},
239
+ false,
240
+ specs,
241
+ timeout,
242
+ {},
243
+ subop_span,
244
+ },
245
+ [ctx, subop_span](auto&& resp) {
246
+ {
247
+ if (subop_span->uses_tags()) {
248
+ subop_span->add_tag(tracing::attributes::op::retry_count,
249
+ resp.ctx.retry_attempts());
250
+ }
251
+ subop_span->end();
252
+ }
211
253
  handler_type local_handler{};
212
254
  {
213
255
  std::scoped_lock lock(ctx->mutex_);
@@ -21,8 +21,10 @@
21
21
  #include "core/impl/lookup_in_replica.hxx"
22
22
  #include "core/impl/replica_utils.hxx"
23
23
  #include "core/impl/subdoc/command.hxx"
24
+ #include "core/impl/with_cancellation.hxx"
24
25
  #include "core/operations/document_lookup_in.hxx"
25
26
  #include "core/operations/operation_traits.hxx"
27
+ #include "core/tracing/constants.hxx"
26
28
  #include "core/utils/movable_function.hxx"
27
29
 
28
30
  #include <couchbase/codec/encoded_value.hxx>
@@ -139,23 +141,71 @@ struct lookup_in_any_replica_request {
139
141
  {
140
142
  }
141
143
 
144
+ void add_cancellation_token(std::shared_ptr<impl::cancellation_token> token)
145
+ {
146
+ std::scoped_lock<std::mutex> lock(cancel_tokens_mutex_);
147
+ cancel_tokens_.emplace_back(std::move(token));
148
+ }
149
+
150
+ auto get_cancellation_tokens()
151
+ -> std::vector<std::shared_ptr<impl::cancellation_token>>
152
+ {
153
+ std::vector<std::shared_ptr<impl::cancellation_token>> tokens{};
154
+ {
155
+ std::scoped_lock<std::mutex> lock(cancel_tokens_mutex_);
156
+ std::swap(tokens, cancel_tokens_);
157
+ }
158
+ return tokens;
159
+ }
160
+
142
161
  handler_type handler_;
143
162
  std::size_t expected_responses_;
144
163
  bool done_{ false };
145
164
  std::mutex mutex_{};
165
+ std::vector<std::shared_ptr<impl::cancellation_token>> cancel_tokens_{};
166
+ std::mutex cancel_tokens_mutex_{};
146
167
  };
147
168
  auto ctx = std::make_shared<replica_context>(std::move(h), nodes.size());
148
169
 
149
170
  for (const auto& node : nodes) {
171
+ auto subop_span = core->tracer()->create_span(
172
+ node.is_replica ? tracing::operation::mcbp_lookup_in_replica
173
+ : tracing::operation::mcbp_lookup_in,
174
+ parent_span);
175
+
176
+ if (subop_span->uses_tags()) {
177
+ subop_span->add_tag(tracing::attributes::op::service, tracing::service::key_value);
178
+ subop_span->add_tag(tracing::attributes::op::operation_name,
179
+ node.is_replica ? tracing::operation::mcbp_lookup_in_replica
180
+ : tracing::operation::mcbp_lookup_in);
181
+ subop_span->add_tag(tracing::attributes::op::bucket_name, id.bucket());
182
+ subop_span->add_tag(tracing::attributes::op::scope_name, id.scope());
183
+ subop_span->add_tag(tracing::attributes::op::collection_name, id.collection());
184
+ }
185
+
150
186
  if (node.is_replica) {
151
187
  document_id replica_id{ id };
152
188
  replica_id.node_index(node.index);
153
- auto replica_req = impl::lookup_in_replica_request{
154
- std::move(replica_id), specs, timeout, parent_span
189
+ impl::with_cancellation<impl::lookup_in_replica_request> replica_req{
190
+ {
191
+ std::move(replica_id),
192
+ specs,
193
+ timeout,
194
+ subop_span,
195
+ },
155
196
  };
197
+ ctx->add_cancellation_token(replica_req.cancel_token);
156
198
  replica_req.access_deleted = access_deleted;
157
- core->execute(replica_req, [ctx](auto&& resp) {
199
+ core->execute(replica_req, [ctx, subop_span](auto&& resp) {
200
+ {
201
+ if (subop_span->uses_tags()) {
202
+ subop_span->add_tag(tracing::attributes::op::retry_count,
203
+ resp.ctx.retry_attempts());
204
+ }
205
+ subop_span->end();
206
+ }
158
207
  handler_type local_handler;
208
+ std::vector<std::shared_ptr<impl::cancellation_token>> cancel_tokens;
159
209
  {
160
210
  std::scoped_lock lock(ctx->mutex_);
161
211
  if (ctx->done_) {
@@ -172,6 +222,10 @@ struct lookup_in_any_replica_request {
172
222
  }
173
223
  ctx->done_ = true;
174
224
  std::swap(local_handler, ctx->handler_);
225
+ cancel_tokens = ctx->get_cancellation_tokens();
226
+ }
227
+ for (const auto& token : cancel_tokens) {
228
+ token->cancel();
175
229
  }
176
230
  if (local_handler) {
177
231
  response_type res{};
@@ -194,46 +248,70 @@ struct lookup_in_any_replica_request {
194
248
  }
195
249
  });
196
250
  } else {
197
- core->execute(lookup_in_request{ id, {}, {}, false, specs, timeout },
198
- [ctx](auto&& resp) {
199
- handler_type local_handler{};
200
- {
201
- std::scoped_lock lock(ctx->mutex_);
202
- if (ctx->done_) {
203
- return;
204
- }
205
- --ctx->expected_responses_;
206
- if (resp.ctx.ec()) {
207
- if (ctx->expected_responses_ > 0) {
208
- // just ignore the response
209
- return;
210
- }
211
- // consider document irretrievable and give up
212
- resp.ctx.override_ec(errc::key_value::document_irretrievable);
213
- }
214
- ctx->done_ = true;
215
- std::swap(local_handler, ctx->handler_);
216
- }
217
- if (local_handler) {
218
- auto res = response_type{};
219
- res.ctx = resp.ctx;
220
- res.cas = resp.cas;
221
- res.deleted = resp.deleted;
222
- res.is_replica = false;
223
- for (auto& field : resp.fields) {
224
- auto lookup_in_entry = lookup_in_any_replica_response::entry{};
225
- lookup_in_entry.path = field.path;
226
- lookup_in_entry.value = field.value;
227
- lookup_in_entry.status = field.status;
228
- lookup_in_entry.ec = field.ec;
229
- lookup_in_entry.exists = field.exists;
230
- lookup_in_entry.original_index = field.original_index;
231
- lookup_in_entry.opcode = field.opcode;
232
- res.fields.emplace_back(lookup_in_entry);
233
- }
234
- return local_handler(res);
235
- }
236
- });
251
+ impl::with_cancellation<lookup_in_request> req{
252
+ {
253
+ id,
254
+ {},
255
+ {},
256
+ false,
257
+ specs,
258
+ timeout,
259
+ {},
260
+ subop_span,
261
+ },
262
+ };
263
+ ctx->add_cancellation_token(req.cancel_token);
264
+ core->execute(std::move(req), [subop_span, ctx](auto&& resp) {
265
+ {
266
+ if (subop_span->uses_tags()) {
267
+ subop_span->add_tag(tracing::attributes::op::retry_count,
268
+ resp.ctx.retry_attempts());
269
+ }
270
+ subop_span->end();
271
+ }
272
+ handler_type local_handler{};
273
+ std::vector<std::shared_ptr<impl::cancellation_token>> cancel_tokens;
274
+ {
275
+ std::scoped_lock lock(ctx->mutex_);
276
+ if (ctx->done_) {
277
+ return;
278
+ }
279
+ --ctx->expected_responses_;
280
+ if (resp.ctx.ec()) {
281
+ if (ctx->expected_responses_ > 0) {
282
+ // just ignore the response
283
+ return;
284
+ }
285
+ // consider document irretrievable and give up
286
+ resp.ctx.override_ec(errc::key_value::document_irretrievable);
287
+ }
288
+ ctx->done_ = true;
289
+ std::swap(local_handler, ctx->handler_);
290
+ cancel_tokens = ctx->get_cancellation_tokens();
291
+ }
292
+ for (const auto& token : cancel_tokens) {
293
+ token->cancel();
294
+ }
295
+ if (local_handler) {
296
+ auto res = response_type{};
297
+ res.ctx = resp.ctx;
298
+ res.cas = resp.cas;
299
+ res.deleted = resp.deleted;
300
+ res.is_replica = false;
301
+ for (auto& field : resp.fields) {
302
+ auto lookup_in_entry = lookup_in_any_replica_response::entry{};
303
+ lookup_in_entry.path = field.path;
304
+ lookup_in_entry.value = field.value;
305
+ lookup_in_entry.status = field.status;
306
+ lookup_in_entry.ec = field.ec;
307
+ lookup_in_entry.exists = field.exists;
308
+ lookup_in_entry.original_index = field.original_index;
309
+ lookup_in_entry.opcode = field.opcode;
310
+ res.fields.emplace_back(lookup_in_entry);
311
+ }
312
+ return local_handler(res);
313
+ }
314
+ });
237
315
  }
238
316
  }
239
317
  });