Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(database): say what follows a failed message index repair

Yudhi Armyndharisceda69a6869a
diff --git a/src/database/pg-boot-migrations.ts b/src/database/pg-boot-migrations.ts
index 0ed8a1682..65d3d6249 100644
--- a/src/database/pg-boot-migrations.ts
+++ b/src/database/pg-boot-migrations.ts
@@ -70,7 +70,8 @@ export async function createBootDataSource(
}
await dataSource.synchronize();
// synchronize rebuilds `messages` without its rowids, so the index it kept can now name other messages.
- // Never fail boot over the index: search answers 501 until the next boot repairs it.
+ // Never fail boot over the index: if this repair fails, the search provider's own start-up check re-indexes
+ // what it finds orphaned, and the next boot repairs the rest.
await repairSqliteMessageFts(dataSource).catch((error: unknown) =>
logger.error(`Failed to repair the SQLite message full-text index: ${String(error)}`),
);