{"record":{"id":"9b799e891cc43a78","repo":"medusajs/medusa","slug":"index-engine-failed-to-reset-sync","errorCode":null,"errorMessage":"[Index engine] Failed to reset sync","messagePattern":"\\[Index engine\\] Failed to reset sync","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/modules/index/src/services/index-module-service.ts","lineNumber":473,"sourceCode":"            },\n          })\n        }\n      )\n\n      return\n    }\n\n    try {\n      const changes = await this.configurationChecker_.checkChanges()\n\n      if (!changes.length) {\n        return\n      }\n\n      await this.dataSynchronizer_.syncEntities(changes)\n    } catch (e) {\n      this.logger_.error(e)\n      throw new Error(\"[Index engine] Failed to reset sync\")\n    }\n  }\n}\n","sourceCodeStart":455,"sourceCodeEnd":477,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/modules/index/src/services/index-module-service.ts#L455-L477","documentation":"resetSync clears and rebuilds index data; any failure while deleting/re-syncing changes is logged and rethrown as '[Index engine] Failed to reset sync'.","triggerScenarios":"sync({ strategy: 'reset' }) failing mid-way — e.g. inability to delete existing index rows (locks/permissions) or subsequent re-sync insert failures.","commonSituations":"Resetting the index after schema changes while another sync or worker holds locks; insufficient DB privileges on index tables.","solutions":["Read the logged underlying error to identify whether delete or insert failed","Stop competing sync workers, then retry reset","Verify DB user has DML/DDL rights on the index schema"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { await indexService.sync({ strategy: 'reset' }) } catch (e) { if (e.message === '[Index engine] Failed to reset sync') { /* stop other workers, verify DB perms, retry */ } throw e }","preventionTips":["Run reset when no other sync workers are active","Ensure the DB user can delete from index tables"],"tags":["index","sync","reset"],"backgroundTag":"sync-job-failed","analyzedSha":"5e06e544a296b9033f20f71f11c559f81a0e5739","analyzedAt":"2026-08-27T07:24:39.599Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}