lib/model: Don't include deleted items in kqueue warning threshold (ref #7855) (#8365)

This commit is contained in:
Simon Frei 2022-05-28 20:15:38 +02:00 committed by GitHub
parent de2d7c33a3
commit 5ac122b85f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1045,7 +1045,7 @@ func (f *folder) monitorWatch(ctx context.Context) {
case ev := <-summaryChan: case ev := <-summaryChan:
if data, ok := ev.Data.(FolderSummaryEventData); !ok { if data, ok := ev.Data.(FolderSummaryEventData); !ok {
f.evLogger.Log(events.Failure, "Unexpected type of folder-summary event in folder.monitorWatch") f.evLogger.Log(events.Failure, "Unexpected type of folder-summary event in folder.monitorWatch")
} else if data.Summary.LocalTotalItems > kqueueItemCountThreshold { } else if data.Summary.LocalTotalItems-data.Summary.LocalDeleted > kqueueItemCountThreshold {
f.warnedKqueue = true f.warnedKqueue = true
summarySub.Unsubscribe() summarySub.Unsubscribe()
summaryChan = nil summaryChan = nil