mirror of
https://github.com/andwati/zitadel.git
synced 2026-12-02 17:08:51 +00:00
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:
@@ -7,7 +7,6 @@ import (
|
||||
"github.com/zitadel/logging"
|
||||
|
||||
caos_errs "github.com/zitadel/zitadel/internal/errors"
|
||||
"github.com/zitadel/zitadel/internal/eventstore"
|
||||
"github.com/zitadel/zitadel/internal/eventstore/v1/models"
|
||||
user_repo "github.com/zitadel/zitadel/internal/repository/user"
|
||||
)
|
||||
@@ -35,10 +34,9 @@ type ExternalIDPView struct {
|
||||
}
|
||||
|
||||
func (i *ExternalIDPView) AppendEvent(event *models.Event) (err error) {
|
||||
i.Sequence = event.Sequence
|
||||
i.Sequence = event.Seq
|
||||
i.ChangeDate = event.CreationDate
|
||||
switch eventstore.EventType(event.Type) {
|
||||
case user_repo.UserIDPLinkAddedType:
|
||||
if event.Typ == user_repo.UserIDPLinkAddedType {
|
||||
i.setRootData(event)
|
||||
i.CreationDate = event.CreationDate
|
||||
err = i.SetData(event)
|
||||
|
||||
Reference in New Issue
Block a user