Fix latency spike on application lookup (#21042)

Fixes
https://discord.com/channels/1130383047699738754/1509645089062781058

Caching application entities to improve authentication latency
This commit is contained in:
martmull
2026-05-29 11:06:36 +02:00
committed by GitHub
parent 41832c8d82
commit 961745e9ba
7 changed files with 33 additions and 29 deletions
@@ -80,7 +80,9 @@ export class BackfillRelationJoinColumnIndexesCommand extends ActiveOrSuspendedW
const indexedFieldIds = new Set<string>();
for (const flatIndex of Object.values(flatIndexMaps.byUniversalIdentifier)) {
for (const flatIndex of Object.values(
flatIndexMaps.byUniversalIdentifier,
)) {
if (!isDefined(flatIndex)) {
continue;
}
@@ -155,10 +157,12 @@ export class BackfillRelationJoinColumnIndexesCommand extends ActiveOrSuspendedW
universalFlatIndexMetadata,
joinColumnName,
} of flatIndexBuildPlans) {
const { schemaName, tableName } = getWorkspaceSchemaContextForMigration({
workspaceId,
objectMetadata: flatObjectMetadata,
});
const { schemaName, tableName } = getWorkspaceSchemaContextForMigration(
{
workspaceId,
objectMetadata: flatObjectMetadata,
},
);
await this.workspaceSchemaManagerService.indexManager.createIndex({
queryRunner,