event_create is the wrong place to count events
Bug #1263911 reported by
Thomas Herve
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Triaged
|
Low
|
Unassigned |
Bug Description
Everytime we insert an event, we now do a count to check if we should purge the table, when max_events_
Changed in heat: | |
status: | New → Confirmed |
Changed in heat: | |
milestone: | icehouse-3 → none |
Changed in heat: | |
assignee: | nobody → Kairat Kushaev (kkushaev) |
Changed in heat: | |
status: | Triaged → In Progress |
Changed in heat: | |
status: | In Progress → Triaged |
importance: | Medium → Low |
Changed in heat: | |
milestone: | none → no-priority-tag-bugs |
To post a comment you must log in.
These counts are extremely efficient actually. The query should result in a single index key scan. Still it isn't free and we can do better. The simplest thing to do is to just avoid even bothering to count again for event_purge_ batch_size events being added.