Skip to content

Improvements in Cluster connection creation and Couchbase loader tasks #41

Merged
ashwin2002 merged 2 commits intomainfrom
shared_cluster_batched_coll_load_approach
Mar 13, 2026
Merged

Improvements in Cluster connection creation and Couchbase loader tasks #41
ashwin2002 merged 2 commits intomainfrom
shared_cluster_batched_coll_load_approach

Conversation

@ashwin2002
Copy link
Copy Markdown
Contributor

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.

- Decr. sleep to 5ms within submit_task() calls
- Removed lock base SDKClient booking from pool
@ashwin2002 ashwin2002 merged commit 5b11afc into main Mar 13, 2026
1 check passed
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant