Browse Source

Disable inline expired event deletion to prevent crashes (v0.52.9)

- Disable goroutine that deleted expired events during query processing
- This was causing "assignment to entry in nil map" Badger panics under load
- Expired events will remain until proper background cleanup is implemented
- Added TODO comments explaining the issue and fix needed

Files modified:
- pkg/database/query-events.go: Disable inline expired event deletion
- pkg/version/version: Bump to v0.52.9

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
main v0.52.9
woikos 4 months ago
parent
commit
bb858a0d6f
No known key found for this signature in database
  1. 16
      pkg/database/query-events.go
  2. 2
      pkg/version/version

16
pkg/database/query-events.go

@ -590,14 +590,14 @@ func (d *D) QueryEventsWithOptions(c context.Context, f *filter.F, includeDelete @@ -590,14 +590,14 @@ func (d *D) QueryEventsWithOptions(c context.Context, f *filter.F, includeDelete
if f.Limit != nil && len(evs) > int(*f.Limit) {
evs = evs[:*f.Limit]
}
// delete the expired events in a background thread
go func() {
for i, ser := range expDeletes {
if err = d.DeleteEventBySerial(c, ser, expEvs[i]); chk.E(err) {
continue
}
}
}()
// TODO: DISABLED - inline deletion of expired events causes Badger race conditions
// under high concurrent load ("assignment to entry in nil map" panic).
// Expired events should be cleaned up by a separate, rate-limited background
// worker instead of being deleted inline during query processing.
// See: pkg/storage/gc.go TODOs for proper batch deletion implementation.
if len(expDeletes) > 0 {
log.D.F("QueryEvents: found %d expired events (deletion disabled)", len(expDeletes))
}
}
return

2
pkg/version/version

@ -1 +1 @@ @@ -1 +1 @@
v0.52.8
v0.52.9

Loading…
Cancel
Save