-
Notifications
You must be signed in to change notification settings - Fork 140
Use WaitUntilReady retry strategy for test pool #7643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -1841,8 +1841,6 @@ func (sc *ServerContext) updateCalculatedStats(ctx context.Context) { | |||||||
// Uses retry loop | ||||||||
func (sc *ServerContext) initializeGoCBAgent(ctx context.Context) (*gocbcore.Agent, error) { | ||||||||
err, agent := base.RetryLoop(ctx, "Initialize Cluster Agent", func() (shouldRetry bool, err error, agent *gocbcore.Agent) { | ||||||||
// this timeout is pretty short since we are doing external retries | ||||||||
waitUntilReadyTimeout := 5 * time.Second | ||||||||
agent, err = base.NewClusterAgent( | ||||||||
ctx, | ||||||||
base.CouchbaseClusterSpec{ | ||||||||
|
@@ -1853,7 +1851,11 @@ func (sc *ServerContext) initializeGoCBAgent(ctx context.Context) (*gocbcore.Age | |||||||
X509Keypath: sc.Config.Bootstrap.X509KeyPath, | ||||||||
CACertpath: sc.Config.Bootstrap.CACertPath, | ||||||||
TLSSkipVerify: base.ValDefault(sc.Config.Bootstrap.ServerTLSSkipVerify, false), | ||||||||
}, waitUntilReadyTimeout) | ||||||||
}, | ||||||||
base.CouchbaseClusterWaitUntilReadyOptions{ | ||||||||
// this timeout is pretty short since we are doing external retries | ||||||||
Timeout: 5 * time.Second, | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The server context initialization doesn't specify a RetryStrategy in CouchbaseClusterWaitUntilReadyOptions, which means it will use the zero value (nil). This is inconsistent with test code that explicitly sets BestEffortRetryStrategy. Consider adding an explicit RetryStrategy for consistency.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||
}) | ||||||||
if err != nil { | ||||||||
// since we're starting up - let's be verbose (on console) about these retries happening ... otherwise it looks like nothing is happening ... | ||||||||
base.ConsolefCtx(ctx, base.LevelInfo, base.KeyConfig, "Couldn't initialize cluster agent: %v - will retry...", err) | ||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nvm, I see -
nil
is a parameter...