zitadel/internal/eventstore/handler/v2
Silvan b47f0f546f
fix(handler): optimise snapshot hanlding (#8652)
# Which Problems Are Solved

There are cases where not all statements of multiExec are succeed. This
leads to inconsistent states. One example is [LDAP
IDPs](https://github.com/zitadel/zitadel/issues/7959).

If statements get executed only partially this can lead to inconsistent
states or even break projections for objects which might not were
correctly created in a sub table.

This behaviour is possible because we use
[`SAVEPOINTS`](https://www.postgresql.org/docs/current/sql-savepoint.html)
during each statement of a multiExec.

# How the Problems Are Solved

SAVEPOINTS are only created at the beginning of an exec function not
during every execution like before. Additionally `RELEASE` or `ROLLBACK`
of `SAVEPOINTS` are only used when needed.

# Additional Changes

- refactor some unused parameters

# Additional Context

- closes https://github.com/zitadel/zitadel/issues/7959

(cherry picked from commit ddeeeed303)
2024-10-03 07:49:39 +02:00
..
failed_event_get_count.sql feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00
failed_event_set.sql feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00
failed_event.go feat(storage): generic cache interface (#8628) 2024-09-25 21:40:21 +02:00
field_handler.go fix(eventstore): revert precise decimal (#8527) (#8679) 2024-09-24 18:43:29 +02:00
handler.go fix(handler): optimise snapshot hanlding (#8652) 2024-10-03 07:49:39 +02:00
init.go fix(handler): optimise snapshot hanlding (#8652) 2024-10-03 07:49:39 +02:00
log.go feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00
mock_test.go feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00
reduce.go feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00
state_get_await.sql fix(eventstore): improve pagination of handler filter (#6968) 2023-12-01 12:25:41 +00:00
state_get.sql fix(eventstore): improve pagination of handler filter (#6968) 2023-12-01 12:25:41 +00:00
state_lock.sql feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00
state_set.sql fix(eventstore): improve pagination of handler filter (#6968) 2023-12-01 12:25:41 +00:00
state_test.go fix(eventstore): revert precise decimal (#8527) (#8679) 2024-09-24 18:43:29 +02:00
state.go fix(eventstore): revert precise decimal (#8527) (#8679) 2024-09-24 18:43:29 +02:00
statement_test.go feat(oidc): sid claim for id_tokens issued through login V1 (#8525) 2024-09-03 13:19:00 +00:00
statement.go fix(handler): optimise snapshot hanlding (#8652) 2024-10-03 07:49:39 +02:00