mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-08 11:57:51 +00:00
less spammy snapshotqueue
During testing we spawn a lot of tiny snapshot queues. Make the message less spammy by printing it only if any enqueues were skipped (shouldn't ever happen) or more than one thing got enqueued (likely in real usage, but doesn't happen in testing usually).
This commit is contained in:
parent
3151d83136
commit
ce0761050e
1 changed files with 3 additions and 1 deletions
|
|
@ -192,7 +192,9 @@ func (sq *prioritySnapshotQueue) Stop() {
|
|||
sq.urgent = nil
|
||||
close(sq.background)
|
||||
sq.background = nil
|
||||
sq.logger.Printf("snapshot queue: enqueued %d, skipped %d\n", sq.stats.enqueued, sq.stats.skipped)
|
||||
if sq.stats.skipped > 0 || sq.stats.enqueued > 1 {
|
||||
sq.logger.Printf("snapshot queue: enqueued %d, skipped %d\n", sq.stats.enqueued, sq.stats.skipped)
|
||||
}
|
||||
}
|
||||
|
||||
// Enqueue tries to add a fragment to the queue, if the fragment is not already
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue