zitadel/internal/eventstore/handler
Silvan ddeeeed303
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
2024-10-02 18:34:19 +03:00
..
crdb refactor(fmt): run gci on complete project (#7557) 2024-04-03 10:43:43 +00:00
v2 fix(handler): optimise snapshot hanlding (#8652) 2024-10-02 18:34:19 +03:00
init.go feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00
statement.go feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00