parent
40608ce266
commit
f6a0fe5c2f
|
@ -102,7 +102,7 @@ public class BulkItemRequest implements Streamable {
|
|||
request = new UpdateRequest();
|
||||
}
|
||||
request.readFrom(in);
|
||||
if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
|
||||
if (in.getVersion().onOrAfter(Version.V_1_3_3)) {
|
||||
if (in.readBoolean()) {
|
||||
primaryResponse = BulkItemResponse.readBulkItem(in);
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ public class BulkItemRequest implements Streamable {
|
|||
out.writeByte((byte) 2);
|
||||
}
|
||||
request.writeTo(out);
|
||||
if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
|
||||
if (out.getVersion().onOrAfter(Version.V_1_3_3)) {
|
||||
out.writeOptionalStreamable(primaryResponse);
|
||||
out.writeBoolean(ignoreOnReplica);
|
||||
}
|
||||
|
|
|
@ -95,9 +95,9 @@ public class BulkShardRequest extends ShardReplicationOperationRequest<BulkShard
|
|||
out.writeVInt(items.length);
|
||||
for (BulkItemRequest item : items) {
|
||||
if (item != null) {
|
||||
// if we are serializing to a node that is pre 1.4, make sure to pass null to maintain
|
||||
// if we are serializing to a node that is pre 1.3.3, make sure to pass null to maintain
|
||||
// the old behavior of putting null in the request to be ignored on the replicas
|
||||
if (item.isIgnoreOnReplica() && out.getVersion().before(Version.V_1_4_0_Beta1)) {
|
||||
if (item.isIgnoreOnReplica() && out.getVersion().before(Version.V_1_3_3)) {
|
||||
out.writeBoolean(false);
|
||||
} else {
|
||||
out.writeBoolean(true);
|
||||
|
|
Loading…
Reference in New Issue