Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Sync Gateway’s DCP sharded import (cbgt manager setup) to propagate the network connection-string option into cbgt/gocbcore configuration, and refactors connection-string parsing to use gocbcore/v10/connstr instead of the older gocbconnstr package.
Changes:
- Switch connection-string parsing to
github.com/couchbase/gocbcore/v10/connstrand add a shared helper for typed option retrieval. - Refactor cbgt manager option construction into
cbgtManagerOptions, and applynetworkasgocbcoreIOConfigNetworkTypewhen present. - Add/extend unit tests covering typed option parsing and cbgt manager option building for
networkandkv_buffer_sizescenarios.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| go.mod | Removes direct dependency on github.com/couchbaselabs/gocbconnstr v1. |
| go.sum | Drops gocbconnstr v1 checksums consistent with go.mod cleanup. |
| base/gocb_connection_string.go | Switches to gocbcore/connstr and introduces getConnSpecOption + networkKey. |
| base/gocb_connection_string_test.go | Adds unit tests for getConnSpecOption for int and string options. |
| base/dcp_sharded.go | Introduces cbgtManagerOptions helper and applies network to cbgt options. |
| base/dcp_test.go | Adds tests validating cbgt manager options include gocbcoreIOConfigNetworkType when network is set. |
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.
CBG-4600 apply networkType to cbgt
sync_gateway/base/gocb_dcp_client.go
Line 360 in fefbba4
Pre-review checklist
fmt.Print,log.Print, ...)base.UD(docID),base.MD(dbName))docs/apiIntegration Tests