From aa5ee1ade963b91b4b4c2ab8610ca2ef4e3bda06 Mon Sep 17 00:00:00 2001 From: Chris Earle Date: Wed, 4 Apr 2018 13:42:00 -0400 Subject: [PATCH] [Monitoring] HttpExportBulk shouldn't bother setting payload to null (elastic/x-pack-elasticsearch#4287) This avoid setting the payload to `null` when sending it to the remote monitoring cluster. The payload will be GCed when this overall object is GCed, which should be very soon anyway. Original commit: elastic/x-pack-elasticsearch@04f63c4150607eb88d0f2cc93d757a29c3e64da9 --- .../xpack/monitoring/exporter/http/HttpExportBulk.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulk.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulk.java index 5fea82bd001..f23a545b6a5 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulk.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulk.java @@ -96,9 +96,6 @@ class HttpExportBulk extends ExportBulk { } else if (payload.length != 0) { final HttpEntity body = new ByteArrayEntity(payload, ContentType.APPLICATION_JSON); - // free the memory - payload = null; - client.performRequestAsync("POST", "/_bulk", params, body, new ResponseListener() { @Override public void onSuccess(Response response) {