Improvements in Cluster connection creation and Couchbase loader tasks #41
Merged
ashwin2002 merged 2 commits intomainfrom Mar 13, 2026
Merged
Conversation
- Decr. sleep to 5ms within submit_task() calls - Removed lock base SDKClient booking from pool
ashwin2002
added a commit
that referenced
this pull request
Mar 31, 2026
commit 362ccaa Author: Ashwin G <ashwin.govindarajulu@couchbase.com> Date: Tue Mar 31 14:27:05 2026 +0530 Fix bucket collision in SDKClient cache for multi-bucket loading Changed cache key from 'scope+collection' to 'bucket:scope:collection' to prevent wrong SDKClient instances being returned when multiple buckets share identical scope/collection names while using shared Cluster. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> commit ff05c4c Author: Ashwin G <ashwin.govindarajulu@couchbase.com> Date: Mon Mar 23 16:40:28 2026 +0530 Fix memory pressure in SimpleValue for concurrent doc_gen commit 159f6dd Author: Ashwin G <ashwin.govindarajulu@couchbase.com> Date: Tue Mar 17 16:14:29 2026 +0530 Adding Makefile commit 899451b Author: Ashwin G <ashwin.govindarajulu@couchbase.com> Date: Tue Mar 17 13:06:42 2026 +0530 Updating agentic md files for including SharedClusterManager improvements commit ae52264 Merge: 6e16b36 78f9120 Author: Ashwin <ashwintrojan+github@gmail.com> Date: Tue Mar 17 12:52:19 2026 +0530 Merge pull request #43 from couchbaselabs/error_fix Enable shared cluster environment recreation post-shutdown commit 78f9120 Author: Ashwin G <ashwin.govindarajulu@couchbase.com> Date: Tue Mar 17 12:15:31 2026 +0530 Enable shared cluster environment recreation post-shutdown - Track environment shutdown state with volatile flag for thread-safety - Fix initialization race condition preventing environment reuse after shutdown - Maintain proper ClusterEnvironment lifecycle for long-running workloads commit 6e16b36 Merge: 5b11afc c60fb6a Author: Ashwin <ashwintrojan+github@gmail.com> Date: Mon Mar 16 09:06:44 2026 +0530 Merge pull request #42 from dananjay-s/main Init shared env when trying to create shared cluster commit c60fb6a Author: Dananjay <dananjay.s@couchbase.com> Date: Sun Mar 15 10:38:33 2026 +0530 Init shared env when trying to create shared cluster commit 5b11afc Merge: bfb8d9c c5d4db0 Author: Ashwin <ashwintrojan+github@gmail.com> Date: Fri Mar 13 15:21:39 2026 +0530 Merge pull request #41 from couchbaselabs/shared_cluster_batched_coll_load_approach Improvements in Cluster connection creation and Couchbase loader tasks commit c5d4db0 Author: Ashwin G <ashwin.govindarajulu@couchbase.com> Date: Fri Mar 13 14:18:11 2026 +0530 More improvments - Decr. sleep to 5ms within submit_task() calls - Removed lock base SDKClient booking from pool commit 2f112d3 Author: Ashwin G <ashwin.govindarajulu@couchbase.com> Date: Fri Mar 13 13:04:50 2026 +0530 Test new enhancements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
• Added SharedClusterManager to centrally manage shared Cluster instances with reference counting
• Created CollectionLoadBatcher for optimized collection-level workload batching
• Refactored SDKClientPool to use thread-safe client caching with atomic counters
• Removed lock-based client booking in favor of concurrent data structures
• Reduced submit_task() sleep time for improved performance
• Enhanced WorkLoadGenerate, DocOps, and SubDocOps to support the new architecture
Impact: Improved scalability for parallel collection loads and reduced resource contention through optimized cluster connection sharing.