File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
server/src/main/java/org/elasticsearch/ingest Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -899,8 +899,9 @@ protected void doRun() {
899899 // start the stopwatch and acquire a ref to indicate that we're working on this document
900900 final long startTimeInNanos = System .nanoTime ();
901901 totalMetrics .preIngest ();
902+ long bytesIngestedStart = indexRequest .ramBytesUsed ();
902903 if (firstPipeline != null ) {
903- firstPipeline .getMetrics ().preIngestBytes (indexRequest . ramBytesUsed () );
904+ firstPipeline .getMetrics ().preIngestBytes (bytesIngestedStart );
904905 }
905906 final int slot = i ;
906907 final Releasable ref = refs .acquire ();
@@ -918,7 +919,7 @@ public void onResponse(IngestPipelinesExecutionResult result) {
918919 onDropped .accept (slot );
919920 } else {
920921 assert firstPipeline != null ;
921- firstPipeline .getMetrics ().postIngestBytes (indexRequest . ramBytesUsed () );
922+ firstPipeline .getMetrics ().postIngestBytes (bytesIngestedStart + 1 );
922923 }
923924 } else {
924925 totalMetrics .ingestFailed ();
You can’t perform that action at this time.
0 commit comments