Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonip committed Nov 19, 2024
1 parent d4aa307 commit 60be79f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions exporter/elasticsearchexporter/bulkindexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ func (s *syncBulkIndexerSession) Add(ctx context.Context, index string, document
if err != nil {
return err
}
// flush bytes should operate on uncompressed length
// as Elasticsearch http.max_content_length measures uncompressed length.
if s.bi.UncompressedLen() >= s.s.flushBytes {
return s.Flush(ctx)
}
Expand Down

0 comments on commit 60be79f

Please sign in to comment.