zitadel/internal/eventstore
Tim Möhlmann c0e45b63d8
fix: reset the call timestamp after a bulk trigger (#6080)
* reproduce #5808

Add an integration test that imports and gets N amount of human users.
- With N set to 1-10 the operation seems to succeed always
- With N set to 100 the operation seems to fail between 1 and 7 times.

* fix merge issue

* fix: reset the call timestamp after a bulk trigger

With the use of `AS OF SYSTEM TIME` in queries,
there was a change for the query package not
finding the latest projection verson after
a bulk trigger.
If events where processed in the bulk trigger,
the resulting row timestamp would be after the call
start timestamp.
This sometimes resulted in consistency issues when
Set and Get API methods are called in short succession.
For example a Import and Get user could sometimes result in a Not Found
error.

Although the issue was reported for the Management API user import,
it is likely this bug contributed to the flaky integration and e2e tests.

Fixes #5808

* trigger bulk action in GetSession

* don't use the new context in handler schedule

* disable reproduction test

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
2023-07-07 08:15:05 +00:00
..
handler fix: reset the call timestamp after a bulk trigger (#6080) 2023-07-07 08:15:05 +00:00
repository feat(v2): implement user register OTP (#6030) 2023-06-20 10:36:21 +00:00
v1 chore: merge (#5773) 2023-04-28 14:56:51 +00:00
aggregate.go chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
asset.go fix(eventstore): sub queries (#1805) 2021-07-06 13:55:57 +02:00
config.go chore: merge (#5773) 2023-04-28 14:56:51 +00:00
event_base.go chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
event.go feat(cli): setup (#3267) 2022-03-28 10:05:09 +02:00
eventstore_test.go feat(admin-api): list events (#4989) 2023-01-16 11:30:03 +00:00
eventstore.go feat: device authorization RFC 8628 (#5646) 2023-04-19 08:46:02 +00:00
example_test.go feat(admin-api): list events (#4989) 2023-01-16 11:30:03 +00:00
local_crdb_test.go perf: query data AS OF SYSTEM TIME (#5231) 2023-02-27 22:36:43 +01:00
read_model.go perf: query data AS OF SYSTEM TIME (#5231) 2023-02-27 22:36:43 +01:00
search_query_test.go fix: improve performance (#4300) 2022-09-02 14:05:13 +00:00
search_query.go perf: query data AS OF SYSTEM TIME (#5231) 2023-02-27 22:36:43 +01:00
subscription.go chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
unique_constraint.go fix: instance remove (#4602) 2022-10-26 13:06:48 +00:00
version.go chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
write_model.go feat: projections auto create their tables (#3324) 2022-03-23 09:02:39 +01:00