Skip to content

Commit

Permalink
suppress sonarqube warning on non crypto rand
Browse files Browse the repository at this point in the history
  • Loading branch information
SimoneLazzaris committed Feb 17, 2025
1 parent da3916c commit f7fec59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion embedded/store/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ func (idx *indexer) handleWriteStalling(err error) error {
if err := idx.store.FlushIndexes(0, false); err != nil {
return err
}

// NOSONAR (rand is fine here)
sleepTime := writeStallingSleepDurationMin + time.Duration(rand.Intn(int(writeStallingSleepDurationMax-writeStallingSleepDurationMin+1)))
time.Sleep(sleepTime)
return nil
Expand Down

0 comments on commit f7fec59

Please sign in to comment.