Skip to content

Commit

Permalink
CBG-3379 add contexts for logging in interfaces that are supplied by …
Browse files Browse the repository at this point in the history
…sg-bucket (#6422)

* ctx

* Update with sg-bucket changes

* Add dcp

* update go.mod

* Use context that doesn't go out of scope

* fix ctx

* go mod tidy

* amend comment

* Use correct ctx

* update rosmar and sg-bucket

* simplify context in dcp feed

* Update rosmar go.mod
  • Loading branch information
torcolvin authored and mohammed-madi committed Apr 8, 2024
1 parent be676b3 commit afcae7e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion base/collection_n1ql_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,6 @@ func (i *gocbRawIterator) Next(ctx context.Context, valuePtr interface{}) bool {
return false
}

ctx := context.TODO() // fix in sg-bucket
err := JSONUnmarshal(nextBytes, &valuePtr)
if err != nil {
WarnfCtx(ctx, "Unable to marshal view result row into value: %v", err)
Expand Down
1 change: 0 additions & 1 deletion base/config_persistence_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ func TestXattrConfigPersistence(t *testing.T) {
_, reinsertErr := cp.insertConfig(c, configKey, configBody)
require.Equal(t, ErrAlreadyExists, reinsertErr)

ctx := TestCtx(t)
// Retrieve the config, cas should still match insertCas
var loadedConfig map[string]interface{}
loadCas, loadErr := cp.loadConfig(ctx, c, configKey, &loadedConfig)
Expand Down
2 changes: 1 addition & 1 deletion db/background_mgr_resync_dcp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ func TestResyncImportComputeStat(t *testing.T) {

err = WaitForConditionWithOptions(t, func() bool {
var status BackgroundManagerStatus
rawStatus, _ := resycMgr.GetStatus()
rawStatus, _ := resycMgr.GetStatus(ctx)
_ = json.Unmarshal(rawStatus, &status)
return status.State == BackgroundProcessStateCompleted
}, 200, 200)
Expand Down

0 comments on commit afcae7e

Please sign in to comment.