Skip to content

Conversation

@eculver
Copy link
Contributor

@eculver eculver commented May 14, 2025

This reverts commit 3028a39.

After we deployed this commit, we lost metrics for log-service, so we suspect it has something to do with it. I will re-enable the payload size fix one way or the other, but want to get back to working observability for the time being.

@eculver eculver requested review from HammadB and codetheweb May 14, 2025 02:28
@propel-code-bot
Copy link
Contributor

This PR reverts a previous change that increased the max payload size of the log service (Go). The reversion is necessary as the original change led to lost metrics for the log-service. The original fix will be re-implemented differently after observability is restored.

This summary was automatically generated by @propel-code-bot

@github-actions
Copy link

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

Comment on lines +53 to 71
var listener net.Listener
listener, err = net.Listen("tcp", ":"+config.PORT)
if err != nil {
log.Fatal("failed to create grpc server", zap.Error(err))
log.Fatal("failed to listen", zap.Error(err))
}
s := grpc.NewServer(grpc.UnaryInterceptor(sharedOtel.ServerGrpcInterceptor))
healthcheck := health.NewServer()
healthgrpc.RegisterHealthServer(s, healthcheck)

log.Info("log service started")
logservicepb.RegisterLogServiceServer(s, server)
log.Info("log service started", zap.String("address", listener.Addr().String()))
go leader.AcquireLeaderLock(ctx, func(ctx context.Context) {
go purging.PerformPurgingLoop(ctx, lr)
go metrics.PerformMetricsLoop(ctx, lr)
})
if err := s.Serve(listener); err != nil {
log.Fatal("failed to serve", zap.Error(err))
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[BestPractice]

When switching to direct gRPC server setup in main.go, we should make sure to properly clean up resources upon termination. Currently, there's no mechanism to handle graceful shutdown of the server. Consider adding signal handling to properly shut down the gRPC server when the service is being terminated.

if OPTL_TRACING_ENDPOINT != "" {
otel.InitTracing(context.Background(), &otel.TracingConfig{
Service: name,
Service: "sysdb-service",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[CriticalError]

In the grpcutils package, the tracing service name is now hardcoded to "sysdb-service" regardless of what service is actually using it. This will cause tracing to be incorrectly labeled for any service that isn't actually the sysdb-service. The name parameter should be used instead, as it was in the previous version.

"github.com/chroma-core/chroma/go/pkg/utils"
libs "github.com/chroma-core/chroma/go/shared/libs"
"github.com/chroma-core/chroma/go/shared/otel"
sharedOtel "github.com/chroma-core/chroma/go/shared/otel"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[BestPractice]

There's a double import of the otel package in main.go - one with the default name and one with a custom name, which creates unnecessary confusion. You should use a single consistent import.

@eculver eculver enabled auto-merge (squash) May 14, 2025 02:35
@eculver eculver merged commit 525fef9 into main May 14, 2025
71 checks passed
@eculver eculver deleted the eculver/revert-4534 branch May 14, 2025 03:35
Inventrohyder pushed a commit to Inventrohyder/chroma that referenced this pull request Aug 5, 2025
…core#4534)" (chroma-core#4540)

This reverts commit 3028a39.

After we deployed this commit, we lost metrics for log-service, so we
suspect it has something to do with it. I will re-enable the payload
size fix one way or the other, but want to get back to working
observability for the time being.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants