From 62971f55dda49aea65859d3f58814ffabe687d51 Mon Sep 17 00:00:00 2001 From: Matthew Jaffee Date: Thu, 19 May 2022 15:47:25 -0500 Subject: [PATCH] return error in Batch.doImport if there is one swallowing this error was a mistake... caller would not know that ingest failed and might incorrectly report success upstream (e.g. committing offsets to Kafka) --- client/batch.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/client/batch.go b/client/batch.go index 4fa326f80..87a8952ee 100644 --- a/client/batch.go +++ b/client/batch.go @@ -700,9 +700,7 @@ func (b *Batch) Import() error { // import int data. err = b.doImport(frags, clearFrags) if err != nil { - // doImport actually imports the ingested data. An error here, means an error with the value that is trying to be ingested. - // We log the error, so we can continue ingesting. Returning would stop the ingest. - b.log.Printf("error importing batch: %v", err) + return errors.Wrap(err, "doing import") } b.log.Printf("importing fragments took %v", time.Since(makeTime)) }