zitadel/internal/notification/handlers
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
..
integration_test chore: remove parallel running in integration tests (#8904) 2024-11-27 15:32:13 +01:00
mock refactor(handler): cache active instances (#9008) 2024-12-06 11:32:53 +00:00
already_handled.go fix: properly handle otp sms challenge notification in session api (#7653) 2024-03-27 19:48:14 +02:00
back_channel_logout.go feat(OIDC): add back channel logout (#8837) 2024-10-31 15:57:17 +01:00
commands.go feat(notification): use event worker pool (#8962) 2024-11-27 15:01:17 +00:00
config_email.go feat(notification): use event worker pool (#8962) 2024-11-27 15:01:17 +00:00
config_filesystem.go feat: call webhooks at least once (#5454) 2023-03-28 22:09:06 +00:00
config_log.go feat: call webhooks at least once (#5454) 2023-03-28 22:09:06 +00:00
config_sms.go feat(notification): use event worker pool (#8962) 2024-11-27 15:01:17 +00:00
ctx.go feat(notification): use event worker pool (#8962) 2024-11-27 15:01:17 +00:00
gen_mock.go fix: use triggering origin for notification links (#6628) 2023-10-10 13:20:53 +00:00
notification_worker_test.go refactor(handler): cache active instances (#9008) 2024-12-06 11:32:53 +00:00
notification_worker.go refactor(handler): cache active instances (#9008) 2024-12-06 11:32:53 +00:00
origin.go feat: trusted (instance) domains (#8369) 2024-07-31 18:00:38 +03:00
queries.go refactor(handler): cache active instances (#9008) 2024-12-06 11:32:53 +00:00
quota_notifier.go fix: properly handle otp sms challenge notification in session api (#7653) 2024-03-27 19:48:14 +02:00
telemetry_pusher.go perf(milestones): refactor (#8788) 2024-10-28 08:29:34 +00:00
translator.go feat: restrict languages (#6931) 2023-12-05 11:12:01 +00:00
user_notifier_legacy_test.go fix(notifications): bring back legacy notification handling (#9015) 2024-12-06 10:56:19 +01:00
user_notifier_legacy.go fix(notifications): bring back legacy notification handling (#9015) 2024-12-06 10:56:19 +01:00
user_notifier_test.go feat(notification): use event worker pool (#8962) 2024-11-27 15:01:17 +00:00
user_notifier.go fix(notifications): bring back legacy notification handling (#9015) 2024-12-06 10:56:19 +01:00