File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/ServiceControl.Audit/Auditing Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -222,7 +222,7 @@ async Task Loop()
222222 await auditIngestor . Ingest ( contexts ) ;
223223 }
224224
225- consecutiveBatchFailuresCounter . Record ( Interlocked . Exchange ( ref consecutiveBatchFailures , 0 ) ) ;
225+ consecutiveBatchFailuresCounter . Record ( 0 ) ;
226226 }
227227 catch ( OperationCanceledException )
228228 {
@@ -242,7 +242,8 @@ async Task Loop()
242242 context . GetTaskCompletionSource ( ) . TrySetException ( e ) ;
243243 }
244244
245- consecutiveBatchFailuresCounter . Record ( Interlocked . Increment ( ref consecutiveBatchFailures ) ) ;
245+ // no need to do interlocked increment since this is running sequential
246+ consecutiveBatchFailuresCounter . Record ( consecutiveBatchFailures ++ ) ;
246247 }
247248 finally
248249 {
You can’t perform that action at this time.
0 commit comments