mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 15:49:35 +00:00

# Which Problems Are Solved We saw high CPU usage if many events were created on the database. This was caused by the new actions which query for all event types and aggregate types. # How the Problems Are Solved - the handler of action execution does not filter for aggregate and event types. - the index for `instance_id` and `position` is reenabled. # Additional Changes none # Additional Context none
28 lines
535 B
Go
28 lines
535 B
Go
package setup
|
|
|
|
import (
|
|
"context"
|
|
_ "embed"
|
|
|
|
"github.com/zitadel/zitadel/internal/database"
|
|
"github.com/zitadel/zitadel/internal/eventstore"
|
|
)
|
|
|
|
var (
|
|
//go:embed 54.sql
|
|
instancePositionIndex string
|
|
)
|
|
|
|
type InstancePositionIndex struct {
|
|
dbClient *database.DB
|
|
}
|
|
|
|
func (mig *InstancePositionIndex) Execute(ctx context.Context, _ eventstore.Event) error {
|
|
_, err := mig.dbClient.ExecContext(ctx, instancePositionIndex)
|
|
return err
|
|
}
|
|
|
|
func (mig *InstancePositionIndex) String() string {
|
|
return "54_instance_position_index_again"
|
|
}
|