mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-20 03:37:39 +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:
@@ -10,7 +10,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"golang.org/x/text/language"
|
||||
"google.golang.org/grpc/codes"
|
||||
@@ -49,7 +48,6 @@ func TestMain(m *testing.M) {
|
||||
// Get calls would return a Not Found error.
|
||||
func TestImport_and_Get(t *testing.T) {
|
||||
const N = 100
|
||||
var misses int
|
||||
|
||||
for i := 0; i < N; i++ {
|
||||
firstName := strconv.Itoa(i)
|
||||
@@ -76,18 +74,11 @@ func TestImport_and_Get(t *testing.T) {
|
||||
|
||||
_, err = Client.GetUserByID(CTX, &management.GetUserByIDRequest{Id: res.GetUserId()})
|
||||
|
||||
if s, ok := status.FromError(err); ok {
|
||||
if s == nil {
|
||||
return
|
||||
}
|
||||
if s.Code() == codes.NotFound {
|
||||
t.Log(s)
|
||||
misses++
|
||||
return
|
||||
}
|
||||
s, ok := status.FromError(err)
|
||||
if ok && s != nil && s.Code() == codes.NotFound {
|
||||
t.Errorf("iteration %d: user with id %q not found", i, res.GetUserId())
|
||||
}
|
||||
require.NoError(t, err) // catch and fail on any other error
|
||||
})
|
||||
}
|
||||
assert.Zerof(t, misses, "Not Found errors %d out of %d", misses, N)
|
||||
}
|
||||
|
Reference in New Issue
Block a user