-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat(bigtable): Enable routing cookie for enhanced retries #12964
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 |
|---|---|---|
| @@ -1,6 +1 @@ | ||
| TestMutateRows_Retry_WithRoutingCookie\| | ||
| TestReadRow_Retry_WithRoutingCookie\| | ||
| TestReadRows_Retry_WithRoutingCookie\| | ||
| TestReadRows_Retry_WithRoutingCookie_MultipleErrorResponses\| | ||
| TestReadRows_Retry_WithRetryInfo_MultipleErrorResponse\| | ||
| TestSampleRowKeys_Retry_WithRoutingCookie | ||
| TestReadRows_Retry_WithRetryInfo_MultipleErrorResponse |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -457,6 +457,9 @@ type opTracer struct { | |
| currAttempt attemptTracer | ||
|
|
||
| appBlockingLatency float64 | ||
|
|
||
| // For routing cookie and gRPC attempt number | ||
| cookies map[string]string | ||
| } | ||
|
|
||
| func (o *opTracer) setStartTime(t time.Time) { | ||
|
|
@@ -524,14 +527,20 @@ func (a *attemptTracer) setServerLatencyErr(err error) { | |
| } | ||
|
|
||
| func (tf *builtinMetricsTracerFactory) createBuiltinMetricsTracer(ctx context.Context, tableName string, isStreaming bool) builtinMetricsTracer { | ||
| if !tf.enabled { | ||
| return builtinMetricsTracer{builtInEnabled: false} | ||
| } | ||
| // Operation has started but not the attempt. | ||
| // So, create only operation tracer and not attempt tracer | ||
| currOpTracer := opTracer{} | ||
| currOpTracer := opTracer{ | ||
|
Contributor
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. I don't think metrics is the right place for this feature (like I mentioned in the other comment) because this is retry related and doesn't really have anything to do with metrics?
Contributor
Author
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. I did not want to add another tracer. I can create a follow up PR to this one. Renaming metricsTracer to Tracer and file to tracer.go |
||
| cookies: make(map[string]string), | ||
| } | ||
| currOpTracer.setStartTime(time.Now()) | ||
|
|
||
| if !tf.enabled { | ||
| return builtinMetricsTracer{ | ||
| builtInEnabled: false, | ||
| currOp: currOpTracer, | ||
| } | ||
| } | ||
|
|
||
| return builtinMetricsTracer{ | ||
| ctx: ctx, | ||
| builtInEnabled: tf.enabled, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.