- 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
Enterprise
This folder contains source available enterprise code as well as import directives for closed source enterprise code.
Build Information
The source code in this folder is only included with builds specifying the enterprise or sourceavailble build tags. If you have a copy of https://github.com/mattermost/enterprise checked out as a peer to this repository, enterprise will be set automatically and the imports from both external_imports.go and local_imports.go will apply.
In a development environment (when BUILD_NUMBER is left undefined or explicitly set to dev), the sourceavailable build tag will be set automatically and only the imports from local_imports.go will apply.
License
See the LICENSE file for license rights and limitations. See also Mattermost Source Available License to learn more.
Contributing
Contributions to source available enterprise code are welcome. Please see CONTRIBUTING.md.