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 ddeeeed30375a888b314c5a5bc9c2182d33916c9)
2024-10-03 07:49:39 +02:00
..
2024-03-27 15:48:22 +02:00
2024-02-28 10:55:54 +02:00
2024-04-16 11:19:17 +00:00
2024-08-14 14:18:14 +00:00
2024-03-27 15:48:22 +02:00
2024-09-11 10:53:55 +00:00
2024-08-15 06:37:06 +02:00
2024-03-27 15:48:22 +02:00
2024-03-27 15:48:22 +02:00
2024-03-27 15:48:22 +02:00
2024-09-13 13:22:25 +00:00
2024-08-12 22:32:01 +02:00