couchbase 3.5.5 → 3.5.6

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 (45) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/ext/cache/extconf_include.rb +3 -3
  4. data/ext/cache/mozilla-ca-bundle.crt +64 -33
  5. data/ext/cache/mozilla-ca-bundle.sha256 +1 -1
  6. data/ext/couchbase/CMakeLists.txt +1 -1
  7. data/ext/couchbase/core/bucket.cxx +16 -14
  8. data/ext/couchbase/core/bucket.hxx +2 -1
  9. data/ext/couchbase/core/cluster.cxx +9 -7
  10. data/ext/couchbase/core/cluster.hxx +2 -1
  11. data/ext/couchbase/core/impl/cluster.cxx +55 -18
  12. data/ext/couchbase/core/impl/collection.cxx +12 -11
  13. data/ext/couchbase/core/impl/observe_poll.cxx +7 -7
  14. data/ext/couchbase/core/impl/replica_utils.cxx +5 -5
  15. data/ext/couchbase/core/impl/replica_utils.hxx +2 -1
  16. data/ext/couchbase/core/logger/logger.cxx +1 -1
  17. data/ext/couchbase/core/meta/features.hxx +5 -0
  18. data/ext/couchbase/core/operations/document_get_all_replicas.hxx +3 -4
  19. data/ext/couchbase/core/operations/document_get_any_replica.hxx +3 -3
  20. data/ext/couchbase/core/operations/document_lookup_in_all_replicas.hxx +3 -3
  21. data/ext/couchbase/core/operations/document_lookup_in_any_replica.hxx +3 -3
  22. data/ext/couchbase.cxx +1 -0
  23. data/ext/extconf.rb +10 -0
  24. data/ext/rcb_backend.cxx +77 -1
  25. data/ext/rcb_logger.cxx +6 -1
  26. data/ext/rcb_logger.hxx +3 -0
  27. data/ext/rcb_range_scan.cxx +2 -4
  28. data/lib/couchbase/bucket.rb +0 -8
  29. data/lib/couchbase/cluster.rb +2 -13
  30. data/lib/couchbase/collection.rb +0 -43
  31. data/lib/couchbase/collection_options.rb +3 -3
  32. data/lib/couchbase/datastructures/couchbase_queue.rb +1 -1
  33. data/lib/couchbase/datastructures/couchbase_set.rb +1 -1
  34. data/lib/couchbase/deprecations.rb +61 -0
  35. data/lib/couchbase/fork_hooks.rb +32 -0
  36. data/lib/couchbase/management/analytics_index_manager.rb +1 -1
  37. data/lib/couchbase/management/bucket_manager.rb +1 -1
  38. data/lib/couchbase/management/collection_manager.rb +1 -1
  39. data/lib/couchbase/management/query_index_manager.rb +1 -1
  40. data/lib/couchbase/options.rb +2 -2
  41. data/lib/couchbase/protostellar/request_generator/query.rb +1 -1
  42. data/lib/couchbase/utils/time.rb +1 -1
  43. data/lib/couchbase/version.rb +1 -1
  44. data/lib/couchbase.rb +2 -0
  45. metadata +7 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be863220c927e18f335ca7ef97f6ad19c48af740fb444d3cdb210c334aeb0a16
4
- data.tar.gz: 72f2f6b4c6464e02ca76d8d7867e4aefca1199f9747046842dcbf4e707505138
3
+ metadata.gz: fbba46dc6215cb8801a07517e6a711ccd4f5a4791acd9268079c69bbc9a45151
4
+ data.tar.gz: be0b4ab79a765b7a167313d8c485be7bc17170e7b709f16abacb1aa003aba5a4
5
5
  SHA512:
6
- metadata.gz: 023ddc717eb09127ad20a2c91106f55cbd3e1c787f4d9476a479ba1753e27638e2535fc445efafb16454c639a1f8e89de7959a63671d88542d3d49ce0a4dea3b
7
- data.tar.gz: 38c123cf7ddd2dc4c6f2251f55ed9bdcf49d8cf0443cc0a42a86e165e99fe13affaccd59995da16f1c8b7aff65c281956cddb52ef8f15e3c17357edc82014d2e
6
+ metadata.gz: bd61a4250aa2e1f6ee69b44bf9bed1378653c778f946546fa521225f0f4e4f8562a27fff83cd1e27b9e594507a2b0ae42a706a53718b92384d7c2252ab8e8398
7
+ data.tar.gz: 2735a18eb2df270cf4689b9aabfa643339d4feb28ff45eb74d31f1dc2ac33755a9881e5b5a49c749e21fc86ca93b5f3bc87aa597fcdd5f911e04521be43d124c
data/README.md CHANGED
@@ -23,7 +23,7 @@ The library has been tested with MRI 3.1, 3.2 and 3.3. Supported platforms are L
23
23
  Add this line to your application's Gemfile:
24
24
 
25
25
  ```ruby
26
- gem "couchbase", "3.5.5"
26
+ gem "couchbase", "3.5.6"
27
27
  ```
28
28
 
29
29
  And then execute:
@@ -3,6 +3,6 @@ cmake_flags << "-DCPM_USE_NAMED_CACHE_DIRECTORIES=ON"
3
3
  cmake_flags << "-DCPM_USE_LOCAL_PACKAGES=OFF"
4
4
  cmake_flags << "-DCPM_SOURCE_CACHE=#{File.expand_path('cache', __dir__)}"
5
5
  cmake_flags << "-DCOUCHBASE_CXX_CLIENT_EMBED_MOZILLA_CA_BUNDLE_ROOT=#{File.expand_path('cache', __dir__)}"
6
- cmake_flags << "-DEXT_GIT_REVISION=987a0b43b2dd7530573acdc3655fef7d6cdd7d17"
7
- cmake_flags << "-DCOUCHBASE_CXX_CLIENT_GIT_REVISION=24dca979ec842ce200aaa1741f1271a4a61c837d"
8
- cmake_flags << "-DCOUCHBASE_CXX_CLIENT_GIT_DESCRIBE=1.0.5-0-g24dca97"
6
+ cmake_flags << "-DEXT_GIT_REVISION=6d89cab6c6a03726fb3bf1d8cccb9f07097fd7fb"
7
+ cmake_flags << "-DCOUCHBASE_CXX_CLIENT_GIT_REVISION=b5b5145145e656d70962fe3cbb78f5af53eaaf63"
8
+ cmake_flags << "-DCOUCHBASE_CXX_CLIENT_GIT_DESCRIBE=1.0.6-0-gb5b5145"
@@ -1,7 +1,7 @@
1
1
  ##
2
2
  ## Bundle of CA Root Certificates
3
3
  ##
4
- ## Certificate data from Mozilla as of: Tue Dec 31 04:12:05 2024 GMT
4
+ ## Certificate data from Mozilla as of: Tue Feb 25 04:12:03 2025 GMT
5
5
  ##
6
6
  ## Find updated versions here: https://curl.se/docs/caextract.html
7
7
  ##
@@ -16,7 +16,7 @@
16
16
  ## Just configure this file as the SSLCACertificateFile.
17
17
  ##
18
18
  ## Conversion done with mk-ca-bundle.pl version 1.29.
19
- ## SHA256: c99d6d3f8d3d4e47719ba2b648992f5b58b150128d3aca3c05c566d8dc98e116
19
+ ## SHA256: 620fd89c02acb0019f1899dab7907db5d20735904f5a9a0d3a8771a5857ac482
20
20
  ##
21
21
 
22
22
 
@@ -371,37 +371,6 @@ NU0LbbqhPcCT4H8js1WtciVORvnSFu+wZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6Lqj
371
371
  viOvrv1vA+ACOzB2+httQc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ
372
372
  -----END CERTIFICATE-----
373
373
 
374
- SwissSign Silver CA - G2
375
- ========================
376
- -----BEGIN CERTIFICATE-----
377
- MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCQ0gxFTAT
378
- BgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMB4X
379
- DTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0NlowRzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3
380
- aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG
381
- 9w0BAQEFAAOCAg8AMIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644
382
- N0MvFz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLHvGiTSf5YXu6t+WiE7brYT7QbNHm
383
- +/pe7R20nqA1W6GSy/BJkv6FCgU+5tkL4k+73JU3/JHpMjUi0R86TieFnbAVlDLaYQ1HTWBCrpJH
384
- 6INaUFjpiou5XaHc3ZlKHzZnu0jkg7Y360g6rw9njxcH6ATK72oxh9TAtvmUcXtnZLi2kUpCe2Uu
385
- MGoM9ZDulebyzYLs2aFK7PayS+VFheZteJMELpyCbTapxDFkH4aDCyr0NQp4yVXPQbBH6TCfmb5h
386
- q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70luJpaPXJhkGaH7gzWTdQRdAtq/gsD/KNVV4n+Ssuu
400
- WxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJ
401
- DIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ub
402
- DgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u
403
- -----END CERTIFICATE-----
404
-
405
374
  SecureTrust CA
406
375
  ==============
407
376
  -----BEGIN CERTIFICATE-----
@@ -3609,3 +3578,65 @@ AgEGMB0GA1UdDgQWBBTrQciu/NWeUUj1vYv0hyCTQSvT9DAKBggqhkjOPQQDAwNoADBlAjEA2S6J
3609
3578
  fl5OpBEHvVnCB96rMjhTKkZEBhd6zlHp4P9mLQlO4E/0BdGF9jVg3PVys0Z9AjBEmEYagoUeYWmJ
3610
3579
  SwdLZrWeqrqgHkHZAXQ6bkU6iYAZezKYVWOr62Nuk22rGwlgMU4=
3611
3580
  -----END CERTIFICATE-----
3581
+
3582
+ D-TRUST BR Root CA 2 2023
3583
+ =========================
3584
+ -----BEGIN CERTIFICATE-----
3585
+ MIIFqTCCA5GgAwIBAgIQczswBEhb2U14LnNLyaHcZjANBgkqhkiG9w0BAQ0FADBIMQswCQYDVQQG
3586
+ EwJERTEVMBMGA1UEChMMRC1UcnVzdCBHbWJIMSIwIAYDVQQDExlELVRSVVNUIEJSIFJvb3QgQ0Eg
3587
+ MiAyMDIzMB4XDTIzMDUwOTA4NTYzMVoXDTM4MDUwOTA4NTYzMFowSDELMAkGA1UEBhMCREUxFTAT
3588
+ BgNVBAoTDEQtVHJ1c3QgR21iSDEiMCAGA1UEAxMZRC1UUlVTVCBCUiBSb290IENBIDIgMjAyMzCC
3589
+ AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK7/CVmRgApKaOYkP7in5M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8l5VAk1/DLQOj7aRv
3603
+ U9f6QA4w9QAgLABMjDu0ox+2v5Eyq6+SmNMW5tTRVFxDWy6u71cqqLRvpO8NVhTaIasgdp4D/Ca4
3604
+ nj8+AybmTNudX0KEPUUDAxxZiMrcLmEkWqTqJwtzEr5SswrPMhfiHocaFpVIbVrg0M8JkiZmkdij
3605
+ YQ6qgYF/6FKC0ULn4B0Y+qSFNueG4A3rvNTJ1jxD8V1Jbn6Bm2m1iWKPiFLY1/4nwSPFyysCu7Ff
3606
+ /vtDhQNGvl3GyiEm/9cCnnRK3PgTFbGBVzbLZVzRHTF36SXDw7IyN9XxmAnkbWOACKsGkoHU6XCP
3607
+ pz+y7YaMgmo1yEJagtFSGkUPFaUA8JR7ZSdXOUPPfH/mvTWze/EZTN46ls/pdu4D58JDUjxqgejB
3608
+ WoC9EV2Ta/vH5mQ/u2kc6d0li690yVRAysuTEwrt+2aSEcr1wPrYg1UDfNPFIkZ1cGt5SAYqgpq/
3609
+ 5usWDiJFAbzdNpQ0qTUmiteXue4Icr80knCDgKs4qllo3UCkGJCy89UDyibK79XH4I9TjvAA46jt
3610
+ n/mtd+ArY0+ew+43u3gJhJ65bvspmZDogNOfJA==
3611
+ -----END CERTIFICATE-----
3612
+
3613
+ D-TRUST EV Root CA 2 2023
3614
+ =========================
3615
+ -----BEGIN CERTIFICATE-----
3616
+ MIIFqTCCA5GgAwIBAgIQaSYJfoBLTKCnjHhiU19abzANBgkqhkiG9w0BAQ0FADBIMQswCQYDVQQG
3617
+ EwJERTEVMBMGA1UEChMMRC1UcnVzdCBHbWJIMSIwIAYDVQQDExlELVRSVVNUIEVWIFJvb3QgQ0Eg
3618
+ MiAyMDIzMB4XDTIzMDUwOTA5MTAzM1oXDTM4MDUwOTA5MTAzMlowSDELMAkGA1UEBhMCREUxFTAT
3619
+ BgNVBAoTDEQtVHJ1c3QgR21iSDEiMCAGA1UEAxMZRC1UUlVTVCBFViBSb290IENBIDIgMjAyMzCC
3620
+ AiIwDQYJ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mo1wj/Zbjb6JzkcBahsgIIlbyIIQbODnmaprxiqgYzWRaoUlrRc4pZt+UPJ26oUFKidBK7GB0aL2
3634
+ QHWpDsvxVUjY7NHss+jOFKE17MJeNRqrphYBBo7q3C+jisosketSjl8MmxfPy3MHGcRqwnNU73xD
3635
+ UmPBEcrCRbH0O1P1aa4846XerOhUt7KR/aypH/KH5BfGSah82ApB9PI+53c0BFLd6IHyTS9URZ0V
3636
+ 4U/M5d40VxDJI3IXcI1QcB9WbMy5/zpaT2N6w25lBx2Eof+pDGOJbbJAiDnXH3dotfyc1dZnaVuo
3637
+ dNv8ifYbMvekJKZ2t0dT741Jj6m2g1qllpBFYfXeA08mD6iL8AOWsKwV0HFaanuU5nCT2vFp4LJi
3638
+ TZ6P/4mdm13NRemUAiKN4DV/6PEEeXFsVIP4M7kFMhtYVRFP0OUnR3Hs7dpn1mKmS00PaaLJvOwi
3639
+ S5THaJQXfuKOKD62xur1NGyfN4gHONuGcfrNlUhDbqNPgofXNJhuS5N5YHVpD/Aa1VP6IQzCP+k/
3640
+ HxiMkl14p3ZnGbuy6n/pcAlWVqOwDAstNl7F6cTVg8uGF5csbBNvh1qvSaYd2804BC5f4ko1Di1L
3641
+ +KIkBI3Y4WNeApI02phhXBxvWHZks/wCuPWdCg==
3642
+ -----END CERTIFICATE-----
@@ -1 +1 @@
1
- a3f328c21e39ddd1f2be1cea43ac0dec819eaa20a90425d7da901a11531b3aa5 cacert.pem
1
+ 50a6277ec69113f00c5fd45f09e8b97a4b3e32daa35d3a95ab30137a55386cef cacert.pem
@@ -21,7 +21,7 @@ endif()
21
21
 
22
22
  project(
23
23
  couchbase_cxx_client
24
- VERSION "1.0.5"
24
+ VERSION "1.0.6"
25
25
  LANGUAGES CXX C)
26
26
  message(STATUS "Couchbase C++ client ${couchbase_cxx_client_VERSION} build ${couchbase_cxx_client_BUILD_NUMBER}, master: ${COUCHBASE_CXX_CLIENT_MASTER_PROJECT}")
27
27
  message(STATUS "System: ${CMAKE_SYSTEM_NAME}, ${CMAKE_SYSTEM_VERSION}, ${CMAKE_SYSTEM_PROCESSOR}")
@@ -356,7 +356,7 @@ public:
356
356
  void restart_sessions()
357
357
  {
358
358
  const std::scoped_lock lock(config_mutex_, sessions_mutex_);
359
- if (!config_.has_value()) {
359
+ if (!config_) {
360
360
  return;
361
361
  }
362
362
 
@@ -512,37 +512,38 @@ public:
512
512
  }
513
513
 
514
514
  void with_configuration(
515
- utils::movable_function<void(std::error_code, topology::configuration)>&& handler)
515
+ utils::movable_function<void(std::error_code, std::shared_ptr<topology::configuration>)>&&
516
+ handler)
516
517
  {
517
518
  if (closed_) {
518
- return handler(errc::network::configuration_not_available, topology::configuration{});
519
+ return handler(errc::network::configuration_not_available, nullptr);
519
520
  }
520
521
  if (configured_) {
521
- std::optional<topology::configuration> config{};
522
+ std::shared_ptr<topology::configuration> config{};
522
523
  {
523
524
  const std::scoped_lock config_lock(config_mutex_);
524
525
  config = config_;
525
526
  }
526
527
  if (config) {
527
- return handler({}, config.value());
528
+ return handler({}, config);
528
529
  }
529
- return handler(errc::network::configuration_not_available, topology::configuration{});
530
+ return handler(errc::network::configuration_not_available, nullptr);
530
531
  }
531
532
  const std::scoped_lock lock(deferred_commands_mutex_);
532
533
  deferred_commands_.emplace([self = shared_from_this(), handler = std::move(handler)]() mutable {
533
534
  if (self->closed_ || !self->configured_) {
534
- return handler(errc::network::configuration_not_available, topology::configuration{});
535
+ return handler(errc::network::configuration_not_available, nullptr);
535
536
  }
536
537
 
537
- std::optional<topology::configuration> config{};
538
+ std::shared_ptr<topology::configuration> config{};
538
539
  {
539
540
  const std::scoped_lock config_lock(self->config_mutex_);
540
541
  config = self->config_;
541
542
  }
542
543
  if (config) {
543
- return handler({}, config.value());
544
+ return handler({}, std::move(config));
544
545
  }
545
- return handler(errc::network::configuration_not_available, topology::configuration{});
546
+ return handler(errc::network::configuration_not_available, nullptr);
546
547
  });
547
548
  }
548
549
 
@@ -715,7 +716,7 @@ public:
715
716
  config_->rev_str(),
716
717
  config.rev_str());
717
718
  return;
718
- } else if (config_ < config) {
719
+ } else if (*config_ < config) {
719
720
  CB_LOG_DEBUG("{} will update the configuration old={} -> new={}",
720
721
  log_prefix_,
721
722
  config_->rev_str(),
@@ -742,7 +743,7 @@ public:
742
743
  added = config.nodes;
743
744
  }
744
745
  config_.reset();
745
- config_ = config;
746
+ config_ = std::make_shared<topology::configuration>(config);
746
747
  configured_ = true;
747
748
 
748
749
  {
@@ -964,7 +965,7 @@ private:
964
965
  std::atomic_bool closed_{ false };
965
966
  std::atomic_bool configured_{ false };
966
967
 
967
- std::optional<topology::configuration> config_{};
968
+ std::shared_ptr<topology::configuration> config_{};
968
969
  mutable std::mutex config_mutex_{};
969
970
 
970
971
  std::vector<std::shared_ptr<config_listener>> config_listeners_{};
@@ -1081,7 +1082,8 @@ bucket::bootstrap(utils::movable_function<void(std::error_code, topology::config
1081
1082
 
1082
1083
  void
1083
1084
  bucket::with_configuration(
1084
- utils::movable_function<void(std::error_code, topology::configuration)>&& handler)
1085
+ utils::movable_function<void(std::error_code, std::shared_ptr<topology::configuration>)>&&
1086
+ handler)
1085
1087
  {
1086
1088
  return impl_->with_configuration(std::move(handler));
1087
1089
  }
@@ -189,7 +189,8 @@ public:
189
189
  void update_config(topology::configuration config) override;
190
190
  void bootstrap(utils::movable_function<void(std::error_code, topology::configuration)>&& handler);
191
191
  void with_configuration(
192
- utils::movable_function<void(std::error_code, topology::configuration)>&& handler);
192
+ utils::movable_function<void(std::error_code, std::shared_ptr<topology::configuration>)>&&
193
+ handler);
193
194
 
194
195
  void on_configuration_update(std::shared_ptr<config_listener> handler);
195
196
  void close();
@@ -578,12 +578,12 @@ public:
578
578
  return self->with_bucket_configuration(
579
579
  bucket_name,
580
580
  [self, cap, request = std::move(request), handler = std::forward<Handler>(handler)](
581
- std::error_code ec, const topology::configuration& config) mutable {
581
+ std::error_code ec, const std::shared_ptr<topology::configuration>& config) mutable {
582
582
  if (ec) {
583
583
  handler(request.make_response({ ec }, {}));
584
584
  return;
585
585
  }
586
- if (!config.capabilities.has_bucket_capability(cap)) {
586
+ if (!config->capabilities.has_bucket_capability(cap)) {
587
587
  handler(request.make_response({ errc::common::feature_not_available }, {}));
588
588
  return;
589
589
  }
@@ -980,10 +980,11 @@ public:
980
980
 
981
981
  void with_bucket_configuration(
982
982
  const std::string& bucket_name,
983
- utils::movable_function<void(std::error_code, topology::configuration)>&& handler)
983
+ utils::movable_function<void(std::error_code, std::shared_ptr<topology::configuration>)>&&
984
+ handler)
984
985
  {
985
986
  if (stopped_) {
986
- return handler(errc::network::cluster_closed, {});
987
+ return handler(errc::network::cluster_closed, nullptr);
987
988
  }
988
989
  if (auto bucket = find_bucket_by_name(bucket_name); bucket != nullptr) {
989
990
  return bucket->with_configuration(std::move(handler));
@@ -992,13 +993,13 @@ public:
992
993
  bucket_name,
993
994
  [self = shared_from_this(), bucket_name, handler = std::move(handler)](auto ec) mutable {
994
995
  if (ec) {
995
- return handler(ec, {});
996
+ return handler(ec, nullptr);
996
997
  }
997
998
 
998
999
  if (auto bucket = self->find_bucket_by_name(bucket_name); bucket != nullptr) {
999
1000
  return bucket->with_configuration(std::move(handler));
1000
1001
  }
1001
- return handler(errc::common::bucket_not_found, {});
1002
+ return handler(errc::common::bucket_not_found, nullptr);
1002
1003
  });
1003
1004
  }
1004
1005
 
@@ -1326,7 +1327,8 @@ cluster::ping(std::optional<std::string> report_id,
1326
1327
  void
1327
1328
  cluster::with_bucket_configuration(
1328
1329
  const std::string& bucket_name,
1329
- utils::movable_function<void(std::error_code, topology::configuration)>&& handler) const
1330
+ utils::movable_function<void(std::error_code, std::shared_ptr<topology::configuration>)>&&
1331
+ handler) const
1330
1332
  {
1331
1333
  if (impl_) {
1332
1334
  impl_->with_bucket_configuration(bucket_name, std::move(handler));
@@ -77,7 +77,8 @@ public:
77
77
 
78
78
  void with_bucket_configuration(
79
79
  const std::string& bucket_name,
80
- utils::movable_function<void(std::error_code, topology::configuration)>&& handler) const;
80
+ utils::movable_function<void(std::error_code, std::shared_ptr<topology::configuration>)>&&
81
+ handler) const;
81
82
 
82
83
  void execute(o::analytics_request request, mf<void(o::analytics_response)>&& handler) const;
83
84
  void execute(o::append_request request, mf<void(o::append_response)>&& handler) const;
@@ -79,8 +79,8 @@ cluster::cluster(std::shared_ptr<cluster_impl> impl)
79
79
  namespace
80
80
  {
81
81
  auto
82
- options_to_origin(const std::string& connection_string,
83
- const couchbase::cluster_options& options) -> core::origin
82
+ options_to_origin(const std::string& connection_string, const couchbase::cluster_options& options)
83
+ -> core::origin
84
84
  {
85
85
  auto opts = options.build();
86
86
 
@@ -215,12 +215,27 @@ fork_event_to_asio(fork_event event) -> asio::execution_context::fork_event
215
215
  class cluster_impl : public std::enable_shared_from_this<cluster_impl>
216
216
  {
217
217
  public:
218
- cluster_impl() = default;
218
+ cluster_impl(std::string connection_string, cluster_options options)
219
+ : connection_string_{ std::move(connection_string) }
220
+ , options_{ std::move(options) }
221
+ {
222
+ }
223
+
219
224
  cluster_impl(const cluster_impl&) = delete;
220
225
  cluster_impl(cluster_impl&&) = delete;
221
226
  auto operator=(const cluster_impl&) = delete;
222
227
  auto operator=(cluster_impl&&) = delete;
223
228
 
229
+ [[nodiscard]] auto connection_string() const -> const std::string&
230
+ {
231
+ return connection_string_;
232
+ }
233
+
234
+ [[nodiscard]] auto options() const -> const cluster_options&
235
+ {
236
+ return options_;
237
+ }
238
+
224
239
  ~cluster_impl()
225
240
  {
226
241
  std::promise<void> barrier;
@@ -238,12 +253,10 @@ public:
238
253
  future.get();
239
254
  }
240
255
 
241
- void open(const std::string& connection_string,
242
- const cluster_options& options,
243
- cluster_connect_handler&& handler)
256
+ void open(cluster_connect_handler&& handler)
244
257
  {
245
258
  core_.open(
246
- options_to_origin(connection_string, options),
259
+ options_to_origin(connection_string_, options_),
247
260
  [impl = shared_from_this(), handler = std::move(handler)](std::error_code ec) mutable {
248
261
  if (ec) {
249
262
  return handler(ec, {});
@@ -350,7 +363,7 @@ public:
350
363
  }
351
364
  io_.notify_fork(fork_event_to_asio(event));
352
365
 
353
- if (transactions_) {
366
+ if (event != fork_event::child && transactions_) {
354
367
  transactions_->notify_fork(event);
355
368
  }
356
369
  }
@@ -393,6 +406,8 @@ private:
393
406
  }
394
407
  }
395
408
 
409
+ std::string connection_string_;
410
+ cluster_options options_;
396
411
  asio::io_context io_{ ASIO_CONCURRENCY_HINT_SAFE };
397
412
  core::cluster core_{ io_ };
398
413
  std::shared_ptr<core::transactions::transactions> transactions_{ nullptr };
@@ -423,8 +438,8 @@ cluster::query(std::string statement, const query_options& options, query_handle
423
438
  }
424
439
 
425
440
  auto
426
- cluster::query(std::string statement,
427
- const query_options& options) const -> std::future<std::pair<error, query_result>>
441
+ cluster::query(std::string statement, const query_options& options) const
442
+ -> std::future<std::pair<error, query_result>>
428
443
  {
429
444
  auto barrier = std::make_shared<std::promise<std::pair<error, query_result>>>();
430
445
  auto future = barrier->get_future();
@@ -500,9 +515,8 @@ cluster::search(std::string index_name,
500
515
  }
501
516
 
502
517
  auto
503
- cluster::search(std::string index_name,
504
- search_request request,
505
- const search_options& options) const -> std::future<std::pair<error, search_result>>
518
+ cluster::search(std::string index_name, search_request request, const search_options& options) const
519
+ -> std::future<std::pair<error, search_result>>
506
520
  {
507
521
  auto barrier = std::make_shared<std::promise<std::pair<error, search_result>>>();
508
522
  search(
@@ -513,8 +527,8 @@ cluster::search(std::string index_name,
513
527
  }
514
528
 
515
529
  auto
516
- cluster::connect(const std::string& connection_string,
517
- const cluster_options& options) -> std::future<std::pair<error, cluster>>
530
+ cluster::connect(const std::string& connection_string, const cluster_options& options)
531
+ -> std::future<std::pair<error, cluster>>
518
532
  {
519
533
  auto barrier = std::make_shared<std::promise<std::pair<error, cluster>>>();
520
534
  auto future = barrier->get_future();
@@ -535,8 +549,8 @@ cluster::connect(const std::string& connection_string,
535
549
  auto barrier = std::make_shared<std::promise<std::pair<error, cluster>>>();
536
550
  auto future = barrier->get_future();
537
551
  {
538
- auto impl = std::make_shared<cluster_impl>();
539
- impl->open(connection_string, options, [barrier](auto err, auto c) {
552
+ auto impl = std::make_shared<cluster_impl>(connection_string, options);
553
+ impl->open([barrier](auto err, auto c) {
540
554
  barrier->set_value({ std::move(err), std::move(c) });
541
555
  });
542
556
  }
@@ -552,7 +566,30 @@ cluster::notify_fork(fork_event event) -> void
552
566
  if (!impl_) {
553
567
  return;
554
568
  }
555
- return impl_->notify_fork(event);
569
+ impl_->notify_fork(event);
570
+ if (event != fork_event::child) {
571
+ return;
572
+ }
573
+
574
+ auto new_impl = std::make_shared<cluster_impl>(impl_->connection_string(), impl_->options());
575
+ impl_.reset();
576
+
577
+ {
578
+ auto barrier = std::make_shared<std::promise<void>>();
579
+ auto future = barrier->get_future();
580
+
581
+ new_impl->open([this, barrier, new_impl](const auto& err, const auto& /* c */) {
582
+ if (err.ec()) {
583
+ // TODO(SA): we should fall to background reconnect loop similar to Columnar build
584
+ CB_LOG_ERROR("Unable to reconnect instance after fork: {}", err.ec().message());
585
+ return;
586
+ }
587
+ impl_ = new_impl;
588
+ barrier->set_value();
589
+ });
590
+
591
+ future.get();
592
+ }
556
593
  }
557
594
 
558
595
  void
@@ -884,13 +884,14 @@ public:
884
884
  return core_.with_bucket_configuration(
885
885
  bucket_name_,
886
886
  [this, handler = std::move(handler), orchestrator_opts, core_scan_type](
887
- std::error_code ec, const core::topology::configuration& config) mutable {
887
+ std::error_code ec,
888
+ const std::shared_ptr<core::topology::configuration>& config) mutable {
888
889
  if (ec) {
889
890
  return handler(
890
891
  error(ec, "An error occurred when attempting to fetch the bucket configuration."),
891
892
  {});
892
893
  }
893
- if (!config.capabilities.supports_range_scan()) {
894
+ if (!config->capabilities.supports_range_scan()) {
894
895
  return handler(error(errc::common::feature_not_available,
895
896
  "This bucket does not support range scan."),
896
897
  {});
@@ -913,7 +914,7 @@ public:
913
914
  bucket_name_)),
914
915
  {});
915
916
  }
916
- if (!config.vbmap.has_value() || config.vbmap->empty()) {
917
+ if (!config->vbmap.has_value() || config->vbmap->empty()) {
917
918
  CB_LOG_WARNING("Unable to get vbucket map for `{}` - cannot perform scan operation",
918
919
  bucket_name_);
919
920
  return handler(error(errc::common::request_canceled,
@@ -923,7 +924,7 @@ public:
923
924
 
924
925
  auto orchestrator = core::range_scan_orchestrator(core_.io_context(),
925
926
  agent.value(),
926
- config.vbmap.value(),
927
+ config->vbmap.value(),
927
928
  scope_name_,
928
929
  name_,
929
930
  core_scan_type,
@@ -993,8 +994,8 @@ collection::get(std::string document_id, const get_options& options, get_handler
993
994
  }
994
995
 
995
996
  auto
996
- collection::get(std::string document_id,
997
- const get_options& options) const -> std::future<std::pair<error, get_result>>
997
+ collection::get(std::string document_id, const get_options& options) const
998
+ -> std::future<std::pair<error, get_result>>
998
999
  {
999
1000
  auto barrier = std::make_shared<std::promise<std::pair<error, get_result>>>();
1000
1001
  auto future = barrier->get_future();
@@ -1296,9 +1297,8 @@ collection::unlock(std::string document_id,
1296
1297
  }
1297
1298
 
1298
1299
  auto
1299
- collection::unlock(std::string document_id,
1300
- couchbase::cas cas,
1301
- const unlock_options& options) const -> std::future<error>
1300
+ collection::unlock(std::string document_id, couchbase::cas cas, const unlock_options& options) const
1301
+ -> std::future<error>
1302
1302
  {
1303
1303
  auto barrier = std::make_shared<std::promise<error>>();
1304
1304
  auto future = barrier->get_future();
@@ -1409,8 +1409,9 @@ collection::scan(const couchbase::scan_type& scan_type,
1409
1409
  }
1410
1410
 
1411
1411
  auto
1412
- collection::scan(const couchbase::scan_type& scan_type, const couchbase::scan_options& options)
1413
- const -> std::future<std::pair<error, scan_result>>
1412
+ collection::scan(const couchbase::scan_type& scan_type,
1413
+ const couchbase::scan_options& options) const
1414
+ -> std::future<std::pair<error, scan_result>>
1414
1415
  {
1415
1416
  auto barrier = std::make_shared<std::promise<std::pair<error, scan_result>>>();
1416
1417
  auto future = barrier->get_future();
@@ -96,24 +96,24 @@ number_of_replica_nodes_required(couchbase::replicate_to replicate_to) -> std::u
96
96
  }
97
97
 
98
98
  auto
99
- validate_replicas(const topology::configuration& config,
99
+ validate_replicas(const std::shared_ptr<topology::configuration>& config,
100
100
  couchbase::persist_to persist_to,
101
101
  couchbase::replicate_to replicate_to) -> std::pair<std::error_code, std::uint32_t>
102
102
  {
103
- if (config.node_locator != topology::configuration::node_locator_type::vbucket) {
103
+ if (config->node_locator != topology::configuration::node_locator_type::vbucket) {
104
104
  return { errc::common::feature_not_available, {} };
105
105
  }
106
106
 
107
107
  if (touches_replica(persist_to, replicate_to)) {
108
- if (!config.num_replicas) {
108
+ auto number_of_replicas = config->num_replicas;
109
+ if (!number_of_replicas.has_value()) {
109
110
  return { errc::key_value::durability_impossible, {} };
110
111
  }
111
- auto number_of_replicas = config.num_replicas.value();
112
112
  if (number_of_replica_nodes_required(persist_to) > number_of_replicas ||
113
113
  number_of_replica_nodes_required(replicate_to) > number_of_replicas) {
114
114
  return { errc::key_value::durability_impossible, {} };
115
115
  }
116
- return { {}, number_of_replicas };
116
+ return { {}, number_of_replicas.value() };
117
117
  }
118
118
  return { {}, 0 };
119
119
  }
@@ -335,8 +335,8 @@ observe_poll(const cluster& core, std::shared_ptr<observe_context> ctx)
335
335
  const std::string bucket_name = ctx->bucket_name();
336
336
  core.with_bucket_configuration(
337
337
  bucket_name,
338
- [core, ctx = std::move(ctx)](std::error_code ec,
339
- const core::topology::configuration& config) mutable {
338
+ [core, ctx = std::move(ctx)](
339
+ std::error_code ec, const std::shared_ptr<core::topology::configuration>& config) mutable {
340
340
  if (ec) {
341
341
  return ctx->finish(ec);
342
342
  }
@@ -25,7 +25,7 @@ namespace couchbase::core::impl
25
25
 
26
26
  auto
27
27
  effective_nodes(const document_id& id,
28
- const topology::configuration& config,
28
+ const std::shared_ptr<topology::configuration>& config,
29
29
  const read_preference& preference,
30
30
  const std::string& preferred_server_group) -> std::vector<readable_node>
31
31
  {
@@ -37,12 +37,12 @@ effective_nodes(const document_id& id,
37
37
  std::vector<readable_node> available_nodes{};
38
38
  std::vector<readable_node> local_nodes{};
39
39
 
40
- for (std::size_t idx = 0U; idx <= config.num_replicas.value_or(0U); ++idx) {
41
- auto [vbid, server] = config.map_key(id.key(), idx);
42
- if (server.has_value() && server.value() < config.nodes.size()) {
40
+ for (std::size_t idx = 0U; idx <= config->num_replicas.value_or(0U); ++idx) {
41
+ auto [vbid, server] = config->map_key(id.key(), idx);
42
+ if (server.has_value() && server.value() < config->nodes.size()) {
43
43
  const bool is_replica = idx != 0;
44
44
  available_nodes.emplace_back(readable_node{ is_replica, idx });
45
- if (preferred_server_group == config.nodes[server.value()].server_group) {
45
+ if (preferred_server_group == config->nodes[server.value()].server_group) {
46
46
  local_nodes.emplace_back(readable_node{ is_replica, idx });
47
47
  }
48
48
  }
@@ -23,6 +23,7 @@
23
23
 
24
24
  #include "couchbase/read_preference.hxx"
25
25
 
26
+ #include <memory>
26
27
  #include <string>
27
28
  #include <vector>
28
29
 
@@ -42,7 +43,7 @@ struct readable_node {
42
43
  */
43
44
  auto
44
45
  effective_nodes(const document_id& id,
45
- const topology::configuration& config,
46
+ const std::shared_ptr<topology::configuration>& config,
46
47
  const read_preference& preference,
47
48
  const std::string& preferred_server_group) -> std::vector<readable_node>;
48
49
  } // namespace couchbase::core::impl
@@ -322,7 +322,7 @@ create_file_logger(const configuration& logger_settings) -> std::optional<std::s
322
322
  if (error) {
323
323
  return error;
324
324
  }
325
- file_logger = std::move(logger);
325
+ update_file_logger(logger);
326
326
  return {};
327
327
  }
328
328