mark source as "safe" when copying it over

This commit is contained in:
Shay Banon 2013-02-22 12:59:41 +01:00
parent a234e45b59
commit 6978aa2189
1 changed files with 1 additions and 0 deletions

View File

@ -308,6 +308,7 @@ public class IndexRequest extends ShardReplicationOperationRequest<IndexRequest>
public BytesReference getSafeSource() { public BytesReference getSafeSource() {
if (sourceUnsafe) { if (sourceUnsafe) {
source = source.copyBytesArray(); source = source.copyBytesArray();
sourceUnsafe = false;
} }
return source; return source;
} }