From 422bd6c2246978ccb6876d42a5493641934a977e Mon Sep 17 00:00:00 2001 From: David Bond Date: Fri, 19 Jan 2024 23:21:57 +0000 Subject: [PATCH] Use correct argument name in log line (#4252) This commit modifies a log line produced in the WorkerStatusReport function when closing orphaned connections that appears to incorrectly label a worker identifier as a controller identifier. Signed-off-by: David Bond --- internal/session/repository_connection.go | 2 +- internal/session/service_worker_status_report.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/session/repository_connection.go b/internal/session/repository_connection.go index 424be720e..8fc2d4ad9 100644 --- a/internal/session/repository_connection.go +++ b/internal/session/repository_connection.go @@ -391,7 +391,7 @@ func (r *ConnectionRepository) DeleteConnection(ctx context.Context, publicId st return rowsDeleted, nil } -// closeOrphanedConnections looks for connections that are still active, but where not reported by the worker. +// closeOrphanedConnections looks for connections that are still active, but were not reported by the worker. func (r *ConnectionRepository) closeOrphanedConnections(ctx context.Context, workerId string, reportedConnections []string) ([]string, error) { const op = "session.(ConnectionRepository).closeOrphanedConnections" diff --git a/internal/session/service_worker_status_report.go b/internal/session/service_worker_status_report.go index 6a3d4a612..c22278fbe 100644 --- a/internal/session/service_worker_status_report.go +++ b/internal/session/service_worker_status_report.go @@ -60,7 +60,7 @@ func WorkerStatusReport(ctx context.Context, repo *Repository, connRepo *Connect merr = stderrors.Join(merr, errors.New(ctx, errors.Internal, op, fmt.Sprintf("Error closing orphaned connections for worker %s: %v", workerId, err))) } if len(closed) > 0 { - event.WriteSysEvent(ctx, op, "marked unclaimed connections as closed", "controller_id", workerId, "count", len(closed)) + event.WriteSysEvent(ctx, op, "marked unclaimed connections as closed", "worker_id", workerId, "count", len(closed)) } if merr != nil {