mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-18 21:52:54 +00:00
fix(service ping): improve systemID search query to use index (#10566)
# Which Problems Are Solved We noticed that the startup for v4 was way slower than v3. A query without an instanceID filter could be traced back to the systemID query of the service ping. # How the Problems Are Solved A an empty instanceID to the query to ensure it used an appropriate index. # Additional Changes None # Additional Context - Closes https://github.com/zitadel/zitadel/issues/10390 - backport to v4.x
This commit is contained in:
@@ -207,6 +207,7 @@ func (s *systemIDReducer) AppendEvents(events ...eventstore.Event) {
|
||||
|
||||
func (s *systemIDReducer) Query() *eventstore.SearchQueryBuilder {
|
||||
return eventstore.NewSearchQueryBuilder(eventstore.ColumnsEvent).
|
||||
InstanceID(""). // to make sure we can use an appropriate index
|
||||
AddQuery().
|
||||
AggregateTypes(system.AggregateType).
|
||||
EventTypes(system.IDGeneratedType).
|
||||
|
||||
Reference in New Issue
Block a user