mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:07:31 +00:00
fix: improve performance by reducing full table scans (#4684)
* use instance id on update in projections * create index on domain in instance_domain projection * add missing instanceID filter to app queries
This commit is contained in:
@@ -184,6 +184,7 @@ func (p *userAuthMethodProjection) reduceActivateEvent(event eventstore.Event) (
|
||||
handler.NewCond(UserAuthMethodTypeCol, methodType),
|
||||
handler.NewCond(UserAuthMethodResourceOwnerCol, event.Aggregate().ResourceOwner),
|
||||
handler.NewCond(UserAuthMethodTokenIDCol, tokenID),
|
||||
handler.NewCond(UserAuthMethodInstanceIDCol, event.Aggregate().InstanceID),
|
||||
},
|
||||
), nil
|
||||
}
|
||||
@@ -208,6 +209,7 @@ func (p *userAuthMethodProjection) reduceRemoveAuthMethod(event eventstore.Event
|
||||
handler.NewCond(UserAuthMethodUserIDCol, event.Aggregate().ID),
|
||||
handler.NewCond(UserAuthMethodTypeCol, methodType),
|
||||
handler.NewCond(UserAuthMethodResourceOwnerCol, event.Aggregate().ResourceOwner),
|
||||
handler.NewCond(UserAuthMethodInstanceIDCol, event.Aggregate().InstanceID),
|
||||
}
|
||||
if tokenID != "" {
|
||||
conditions = append(conditions, handler.NewCond(UserAuthMethodTokenIDCol, tokenID))
|
||||
|
Reference in New Issue
Block a user