mirror of
https://github.com/mattermost/mattermost.git
synced 2026-09-21 14:20:41 +08:00
- 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