Files
mattermost/server
Jesse Hallam 67a645d2c6 MM-68378: Fix silent bulk failures in OpenSearch/Elasticsearch indexers (#36189)
- Register per-item OnFailure callback to log each rejected document
  with its error type and reason
- Restructure DoJob to close the bulk processor before marking a job
  successful; check Stats().NumFailed after close and fail the job
  when any documents were not indexed
- Use a sync.Once-guarded doClose helper so the processor is flushed
  exactly once across all exit paths; non-success paths return and let
  the defer handle the close
- Close function owns all its logging: warn with error on failure, info
  on success; callers no longer need to log close errors themselves
- Fix ResponseBodyEnabled() hardcoded false → return l.trace so
  per-item error JSON is visible when Trace=all is set
- Set job to error (rather than silently return) when createBulkProcessor
  fails after the job has been claimed
- Add integration tests for both backends that apply a write block to
  verify bulk failures are surfaced as job errors
- Add i18n strings for the two new error codes
2026-04-21 09:20:58 -04:00
..
2026-04-21 02:33:20 -07:00
2024-05-15 12:05:13 -03:00