diff --git a/internal/eventlog/eventlog.go b/internal/eventlog/eventlog.go index f916f2758..b507f79bc 100644 --- a/internal/eventlog/eventlog.go +++ b/internal/eventlog/eventlog.go @@ -72,10 +72,10 @@ func (lg *Log) Add(etype string, data types.EventData) error { lg.updateHead(head) size := lg.numItems age := head.item.Cursor.Diff(lg.oldestCursor) - lg.mu.Unlock() // If the log requires pruning, do the pruning step outside the lock. This // permits readers to continue to make progress while we're working. + lg.mu.Unlock() return lg.checkPrune(head, size, age) }