fix: query organization directly from event store (#10463)

Querying an organization by id allowed to trigger the org projection.
This could lead to performance impacts if the projection gets triggered
too often.

Instead of executing the trigger the organization by id query is now
always executed on the eventstore and reduces all event types required
of the organization requested.

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
Silvan
2025-08-12 11:37:08 +02:00
committed by GitHub
parent 7fff529777
commit 427cbe06f3
16 changed files with 39 additions and 77 deletions

View File

@@ -9,8 +9,11 @@ breaking:
- FILE
- FIELD_NO_DELETE_UNLESS_NAME_RESERVED
- FIELD_NO_DELETE_UNLESS_NUMBER_RESERVED
- ENUM_VALUE_NO_DELETE_UNLESS_NAME_RESERVED
- ENUM_VALUE_NO_DELETE_UNLESS_NUMBER_RESERVED
except:
- FIELD_NO_DELETE
- ENUM_VALUE_NO_DELETE
ignore_unstable_packages: true
lint:
use:

View File

@@ -60,13 +60,13 @@ message LoginV2FeatureFlag {
}
enum ImprovedPerformance {
reserved 1;
reserved "IMPROVED_PERFORMANCE_ORG_BY_ID";
IMPROVED_PERFORMANCE_UNSPECIFIED = 0;
// Uses the eventstore to query the org by id
// instead of the sql table.
IMPROVED_PERFORMANCE_ORG_BY_ID = 1;
// Improves performance on write side by using
// optimized processes to query data to determine
// correctnes of data.
// correctness of data.
IMPROVED_PERFORMANCE_PROJECT_GRANT = 2;
IMPROVED_PERFORMANCE_PROJECT = 3;
IMPROVED_PERFORMANCE_USER_GRANT = 4;

View File

@@ -50,13 +50,13 @@ message ImprovedPerformanceFeatureFlag {
}
enum ImprovedPerformance {
reserved 1;
reserved "IMPROVED_PERFORMANCE_ORG_BY_ID";
IMPROVED_PERFORMANCE_UNSPECIFIED = 0;
// Uses the eventstore to query the org by id
// instead of the sql table.
IMPROVED_PERFORMANCE_ORG_BY_ID = 1;
// Improves performance on write side by using
// optimized processes to query data to determine
// correctnes of data.
// correctness of data.
IMPROVED_PERFORMANCE_PROJECT_GRANT = 2;
IMPROVED_PERFORMANCE_PROJECT = 3;
IMPROVED_PERFORMANCE_USER_GRANT = 4;