|
@@ -155,6 +155,8 @@ public class ReplicationRequest<T extends ReplicationRequest> extends ActionRequ
|
|
|
super.readFrom(in);
|
|
|
if (in.readBoolean()) {
|
|
|
internalShardId = ShardId.readShardId(in);
|
|
|
+ } else {
|
|
|
+ internalShardId = null;
|
|
|
}
|
|
|
consistencyLevel = WriteConsistencyLevel.fromId(in.readByte());
|
|
|
timeout = TimeValue.readTimeValue(in);
|
|
@@ -164,7 +166,12 @@ public class ReplicationRequest<T extends ReplicationRequest> extends ActionRequ
|
|
|
@Override
|
|
|
public void writeTo(StreamOutput out) throws IOException {
|
|
|
super.writeTo(out);
|
|
|
- out.writeOptionalStreamable(internalShardId);
|
|
|
+ if (internalShardId != null) {
|
|
|
+ out.writeBoolean(true);
|
|
|
+ internalShardId.writeTo(out);
|
|
|
+ } else {
|
|
|
+ out.writeBoolean(false);
|
|
|
+ }
|
|
|
out.writeByte(consistencyLevel.id());
|
|
|
timeout.writeTo(out);
|
|
|
out.writeString(index);
|