From 0902e24e06c8fa27d761de86e0c2e792a1b1fd07 Mon Sep 17 00:00:00 2001 From: Qiang Zhao Date: Sat, 16 Nov 2024 00:50:34 +0800 Subject: [PATCH] fix lint --- server/leader_controller.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/leader_controller.go b/server/leader_controller.go index db68b3be..1f837c9a 100644 --- a/server/leader_controller.go +++ b/server/leader_controller.go @@ -891,7 +891,7 @@ func (lc *leaderController) WriteStream(stream proto.OxiaClient_WriteStreamServe } } -//nolint:cognitive-complexity +// nolint:cognitive-complexity func (lc *leaderController) handleWriteStream(closeStreamSignal chan error, stream proto.OxiaClient_WriteStreamServer) { lastCallbackError := atomic.Pointer[error]{} for { @@ -911,27 +911,27 @@ func (lc *leaderController) handleWriteStream(closeStreamSignal chan error, stre slog.Debug("Got request in stream", slog.Any("req", writeRequest)) lc.appendToWalStreamRequest(writeRequest, func(offset int64, timestamp uint64, err error) { if err != nil { - latencyTimer.Done() + latencyTimer.Done() // nolint:contextcheck slog.Debug("Got an error when write to wal", slog.Any("error", err)) lastCallbackError.Store(&err) return } lc.quorumAckTracker.WaitForCommitOffsetAsync(stream.Context(), offset, func(_ context.Context, innerErr error) { if innerErr != nil { - latencyTimer.Done() + latencyTimer.Done() // nolint:contextcheck slog.Debug("Got an error when commit async", slog.Any("error", err)) lastCallbackError.Store(&err) return } var writeResponse *proto.WriteResponse if writeResponse, err = lc.db.ProcessWrite(writeRequest, offset, timestamp, WrapperUpdateOperationCallback); err != nil { - latencyTimer.Done() + latencyTimer.Done() // nolint:contextcheck slog.Debug("Got an error when write to DB", slog.Any("error", err)) lastCallbackError.Store(&err) return } if err = stream.Send(writeResponse); err != nil { - latencyTimer.Done() + latencyTimer.Done() // nolint:contextcheck slog.Debug("Got an error when write response to client", slog.Any("error", err)) lastCallbackError.Store(&err) return