From 6978aa2189be69486fde98daa4fb5c1c44cecf92 Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Fri, 22 Feb 2013 12:59:41 +0100 Subject: [PATCH] mark source as "safe" when copying it over --- src/main/java/org/elasticsearch/action/index/IndexRequest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/elasticsearch/action/index/IndexRequest.java b/src/main/java/org/elasticsearch/action/index/IndexRequest.java index b7ca44d190f..2e8dc717ab5 100644 --- a/src/main/java/org/elasticsearch/action/index/IndexRequest.java +++ b/src/main/java/org/elasticsearch/action/index/IndexRequest.java @@ -308,6 +308,7 @@ public class IndexRequest extends ShardReplicationOperationRequest public BytesReference getSafeSource() { if (sourceUnsafe) { source = source.copyBytesArray(); + sourceUnsafe = false; } return source; }