From 58c79ef86ac26c3b0cc520a4030f6294821b4313 Mon Sep 17 00:00:00 2001 From: Nicolas Ruflin Date: Wed, 17 Jan 2024 15:16:46 +0100 Subject: [PATCH] [Benchmark] Add bulk request response body in case of errors Currently it is tricky to debug issues in case a bulk request fails as the only item returned is the number of items failed. This adds a debug log message in case a bulk error shows up. --- internal/benchrunner/runners/stream/runner.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/benchrunner/runners/stream/runner.go b/internal/benchrunner/runners/stream/runner.go index ef50cbe90a..490a68e777 100644 --- a/internal/benchrunner/runners/stream/runner.go +++ b/internal/benchrunner/runners/stream/runner.go @@ -470,6 +470,7 @@ func (r *runner) performBulkRequest(bulkRequest string) error { } if errors.Errors { + logger.Debug("Error in Elasticsearch bulk request: %s", string(body)) return fmt.Errorf("%d failed", len(errors.Items)) }