Skip to content

Commit

Permalink
don't log other stream errors at ERROR
Browse files Browse the repository at this point in the history
  • Loading branch information
dfawley committed Sep 27, 2022
1 parent 56d344e commit 1b369f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 3 additions & 3 deletions orca/producer.go
Expand Up @@ -169,7 +169,7 @@ func (p *producer) run(ctx context.Context) {
// error.
return
case status.Code(err) == codes.Unimplemented:
// Unimplemented; do not retry.
// Unimplemented; do not retry and log at ERROR level.
logger.Error("Server doesn't support ORCA OOB load reporting protocol; not listening for load reports.")
return
case status.Code(err) == codes.Unavailable:
Expand All @@ -180,8 +180,8 @@ func (p *producer) run(ctx context.Context) {
// exponential backoff mechanism, as we should know it's safe to
// retry when the state is READY again.
default:
// Log all other errors.
logger.Error("Received unexpected stream error:", err, ctx.Err())
// Log all other stream errors.
logger.Info("Received unexpected stream error:", err, ctx.Err())
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions orca/producer_test.go
Expand Up @@ -29,7 +29,6 @@ import (
"google.golang.org/grpc/balancer/roundrobin"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/internal/grpctest"
"google.golang.org/grpc/internal/testutils"
"google.golang.org/grpc/orca"
"google.golang.org/grpc/orca/internal"
Expand Down Expand Up @@ -248,8 +247,6 @@ func (f *fakeORCAService) StreamCoreMetrics(req *v3orcaservicepb.OrcaLoadReportR
// TestProducerBackoff verifies that the ORCA producer applies the proper
// backoff after stream failures.
func (s) TestProducerBackoff(t *testing.T) {
grpctest.TLogger.ExpectErrorN("injected error", 4)

ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout)
defer cancel()

Expand Down

0 comments on commit 1b369f2

Please sign in to comment.