Fix broken metadata sync due to index removal (#11706)

Changing strategy regarding disabling index creation with new relation
system
This commit is contained in:
Charles Bochet
2025-04-23 18:06:19 +02:00
committed by GitHub
parent 4257f30f12
commit 8076ff5b82
5 changed files with 27 additions and 45 deletions

View File

@ -149,20 +149,24 @@ export class WorkspaceSyncMetadataService {
`Workspace relation migrations took ${workspaceRelationMigrationsEnd - workspaceRelationMigrationsStart}ms`,
);
let workspaceIndexMigrations: Partial<WorkspaceMigrationEntity>[] = [];
// 4 - Sync standard indexes on standard objects
const workspaceIndexMigrationsStart = performance.now();
const workspaceIndexMigrations =
await this.workspaceSyncIndexMetadataService.synchronize(
context,
manager,
storage,
if (!isNewRelationEnabled) {
const workspaceIndexMigrationsStart = performance.now();
workspaceIndexMigrations =
await this.workspaceSyncIndexMetadataService.synchronize(
context,
manager,
storage,
);
const workspaceIndexMigrationsEnd = performance.now();
this.logger.log(
`Workspace index migrations took ${workspaceIndexMigrationsEnd - workspaceIndexMigrationsStart}ms`,
);
const workspaceIndexMigrationsEnd = performance.now();
this.logger.log(
`Workspace index migrations took ${workspaceIndexMigrationsEnd - workspaceIndexMigrationsStart}ms`,
);
}
// 5 - Sync standard object metadata identifiers, does not need to return nor apply migrations
const workspaceObjectMetadataIdentifiersStart = performance.now();