feat(eventstore): increase parallel write capabilities (#5940)

This implementation increases parallel write capabilities of the eventstore.
Please have a look at the technical advisories: [05](https://zitadel.com/docs/support/advisory/a10005) and  [06](https://zitadel.com/docs/support/advisory/a10006).
The implementation of eventstore.push is rewritten and stored events are migrated to a new table `eventstore.events2`.
If you are using cockroach: make sure that the database user of ZITADEL has `VIEWACTIVITY` grant. This is used to query events.
This commit is contained in:
Silvan
2023-10-19 12:19:10 +02:00
committed by GitHub
parent 259faba3f0
commit b5564572bc
791 changed files with 30326 additions and 43202 deletions

View File

@@ -105,7 +105,7 @@ func Test_ProjectGrantMemberPrepares(t *testing.T) {
uint64(20211206),
"ro",
"user-id",
database.StringArray{"role-1", "role-2"},
database.TextArray[string]{"role-1", "role-2"},
"gigi@caos-ag.zitadel.ch",
"gigi@caos.ch",
"first-name",
@@ -129,7 +129,7 @@ func Test_ProjectGrantMemberPrepares(t *testing.T) {
Sequence: 20211206,
ResourceOwner: "ro",
UserID: "user-id",
Roles: database.StringArray{"role-1", "role-2"},
Roles: database.TextArray[string]{"role-1", "role-2"},
PreferredLoginName: "gigi@caos-ag.zitadel.ch",
Email: "gigi@caos.ch",
FirstName: "first-name",
@@ -155,7 +155,7 @@ func Test_ProjectGrantMemberPrepares(t *testing.T) {
uint64(20211206),
"ro",
"user-id",
database.StringArray{"role-1", "role-2"},
database.TextArray[string]{"role-1", "role-2"},
"machine@caos-ag.zitadel.ch",
nil,
nil,
@@ -179,7 +179,7 @@ func Test_ProjectGrantMemberPrepares(t *testing.T) {
Sequence: 20211206,
ResourceOwner: "ro",
UserID: "user-id",
Roles: database.StringArray{"role-1", "role-2"},
Roles: database.TextArray[string]{"role-1", "role-2"},
PreferredLoginName: "machine@caos-ag.zitadel.ch",
Email: "",
FirstName: "",
@@ -205,7 +205,7 @@ func Test_ProjectGrantMemberPrepares(t *testing.T) {
uint64(20211206),
"ro",
"user-id-1",
database.StringArray{"role-1", "role-2"},
database.TextArray[string]{"role-1", "role-2"},
"gigi@caos-ag.zitadel.ch",
"gigi@caos.ch",
"first-name",
@@ -221,7 +221,7 @@ func Test_ProjectGrantMemberPrepares(t *testing.T) {
uint64(20211206),
"ro",
"user-id-2",
database.StringArray{"role-1", "role-2"},
database.TextArray[string]{"role-1", "role-2"},
"machine@caos-ag.zitadel.ch",
nil,
nil,
@@ -245,7 +245,7 @@ func Test_ProjectGrantMemberPrepares(t *testing.T) {
Sequence: 20211206,
ResourceOwner: "ro",
UserID: "user-id-1",
Roles: database.StringArray{"role-1", "role-2"},
Roles: database.TextArray[string]{"role-1", "role-2"},
PreferredLoginName: "gigi@caos-ag.zitadel.ch",
Email: "gigi@caos.ch",
FirstName: "first-name",
@@ -260,7 +260,7 @@ func Test_ProjectGrantMemberPrepares(t *testing.T) {
Sequence: 20211206,
ResourceOwner: "ro",
UserID: "user-id-2",
Roles: database.StringArray{"role-1", "role-2"},
Roles: database.TextArray[string]{"role-1", "role-2"},
PreferredLoginName: "machine@caos-ag.zitadel.ch",
Email: "",
FirstName: "",