{"record":{"id":"eecca5f511f0a290","repo":"medusajs/medusa","slug":"index-engine-failed-to-full-sync","errorCode":null,"errorMessage":"[Index engine] Failed to full sync","messagePattern":"\\[Index engine\\] Failed to full sync","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/modules/index/src/services/index-module-service.ts","lineNumber":429,"sourceCode":"            internal: true,\n          },\n        })\n      })\n\n      return\n    }\n\n    try {\n      const entities = await this.configurationChecker_.checkChanges()\n\n      if (!entities.length) {\n        return\n      }\n\n      return await this.dataSynchronizer_.syncEntities(entities)\n    } catch (e) {\n      this.logger_.error(e)\n      throw new Error(\"[Index engine] Failed to full sync\")\n    }\n  }\n\n  private async resetSync() {\n    if (!this.#isWorkerMode) {\n      await this.baseRepository_.transaction(\n        async (transactionManager: SqlEntityManager) => {\n          const metadata = transactionManager.getDriver().getMetadata()\n          const truncableTables = [\n            toMikroORMEntity(IndexData),\n            toMikroORMEntity(IndexRelation),\n            toMikroORMEntity(IndexMetadata),\n            toMikroORMEntity(IndexSync),\n          ].map((entity) => metadata.get(entity.name).collection)\n\n          await transactionManager.execute(\n            `TRUNCATE TABLE ${truncableTables.join(\", \")} CASCADE`\n          )","sourceCodeStart":411,"sourceCodeEnd":447,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/modules/index/src/services/index-module-service.ts#L411-L447","documentation":"fullSync wraps a full re-synchronization of all entities; any exception from the data synchronizer is logged and rethrown as '[Index engine] Failed to full sync'.","triggerScenarios":"sync({ strategy: 'full' }) where inserting/transforming some entity fails — DB constraints, connection loss, or misconfigured schema object representation.","commonSituations":"First-time index build against a large dataset hitting timeouts; schema changes not reflected in the index configuration.","solutions":["Inspect the logged root cause immediately before this error","Fix data/constraint issues or increase DB timeouts, then retry full sync","If schema changed, ensure index module was re-initialized with the current configuration"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { await indexService.sync({ strategy: 'full' }) } catch (e) { if (e.message === '[Index engine] Failed to full sync') { /* inspect logger output, fix data, retry with backoff */ await retry(() => indexService.sync({ strategy: 'full' })) } }","preventionTips":["Fix the logged root cause before retrying","Increase DB timeouts for large first-time syncs"],"tags":["index","sync","full-sync"],"backgroundTag":"sync-job-failed","analyzedSha":"5e06e544a296b9033f20f71f11c559f81a0e5739","analyzedAt":"2026-08-27T07:24:39.599Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}