zitadel/internal/eventstore
Silvan 77cd430b3a
refactor(handler): cache active instances (#9008)
# Which Problems Are Solved

Scheduled handlers use `eventstore.InstanceIDs` to get the all active
instances within a given timeframe. This function scrapes through all
events written within that time frame which can cause heavy load on the
database.

# How the Problems Are Solved

A new query cache `activeInstances` is introduced which caches the ids
of all instances queried by id or host within the configured timeframe.

# Additional Changes

- Changed `default.yaml`
  - Removed `HandleActiveInstances` from custom handler configs
- Added `MaxActiveInstances` to define the maximal amount of cached
instance ids
- fixed start-from-init and start-from-setup to start auth and admin
projections twice
- fixed org cache invalidation to use correct index

# Additional Context

- part of #8999
2024-12-06 11:32:53 +00:00
..
handler refactor(handler): cache active instances (#9008) 2024-12-06 11:32:53 +00:00
repository fix(eventstore): set created filters to exclusion sub-query (#9019) 2024-12-06 11:20:10 +01:00
v1/models fix(eventstore): revert precise decimal (#8527) (#8679) 2024-09-24 18:43:29 +02:00
v3 refactor(eventstore): move push logic to sql (#8816) 2024-12-04 13:51:40 +00:00
aggregate.go feat(v3alpha): web key resource (#8262) 2024-08-14 14:18:14 +00:00
asset.go fix(eventstore): sub queries (#1805) 2021-07-06 13:55:57 +02:00
bench_payload.txt feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00
config.go feat(eventstore): add search table (#8191) 2024-07-03 15:00:56 +00:00
event_base.go refactor(eventstore): move push logic to sql (#8816) 2024-12-04 13:51:40 +00:00
event.go fix(eventstore): revert precise decimal (#8527) (#8679) 2024-09-24 18:43:29 +02:00
eventstore_bench_test.go feat(eventstore): accept transaction in push (#8945) 2024-11-22 17:25:28 +01:00
eventstore_pusher_test.go feat(eventstore): accept transaction in push (#8945) 2024-11-22 17:25:28 +01:00
eventstore_querier_test.go feat(eventstore): exclude aggregate IDs when event_type occurred (#8940) 2024-11-25 15:25:11 +00:00
eventstore_test.go refactor(eventstore): move push logic to sql (#8816) 2024-12-04 13:51:40 +00:00
eventstore.go refactor(handler): cache active instances (#9008) 2024-12-06 11:32:53 +00:00
example_test.go fix(setup): init projections (#7194) 2024-01-25 17:28:20 +01:00
field.go feat(eventstore): add search table (#8191) 2024-07-03 15:00:56 +00:00
local_crdb_test.go refactor(eventstore): move push logic to sql (#8816) 2024-12-04 13:51:40 +00:00
read_model.go fix(eventstore): revert precise decimal (#8527) (#8679) 2024-09-24 18:43:29 +02:00
search_query_test.go fix(eventstore): revert precise decimal (#8527) (#8679) 2024-09-24 18:43:29 +02:00
search_query.go feat(eventstore): exclude aggregate IDs when event_type occurred (#8940) 2024-11-25 15:25:11 +00:00
subscription.go feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00
unique_constraint.go feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00
version_test.go feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00
version.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
write_model.go feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00