Remove dead code

This commit is contained in:
Simon Willnauer 2015-04-24 10:37:55 +02:00
parent 84549f334d
commit 3ff0b21c21
1 changed files with 2 additions and 8 deletions

View File

@ -247,8 +247,8 @@ public abstract class TransportShardReplicationOperationAction<Request extends S
} }
protected class PrimaryOperationRequest { protected class PrimaryOperationRequest {
public ShardId shardId; public final ShardId shardId;
public Request request; public final Request request;
public PrimaryOperationRequest(int shardId, String index, Request request) { public PrimaryOperationRequest(int shardId, String index, Request request) {
this.shardId = new ShardId(index, shardId); this.shardId = new ShardId(index, shardId);
@ -283,15 +283,9 @@ public abstract class TransportShardReplicationOperationAction<Request extends S
@Override @Override
public void readFrom(StreamInput in) throws IOException { public void readFrom(StreamInput in) throws IOException {
super.readFrom(in); super.readFrom(in);
int shard = -1;
shardId = ShardId.readShardId(in); shardId = ShardId.readShardId(in);
request = newReplicaRequestInstance(); request = newReplicaRequestInstance();
request.readFrom(in); request.readFrom(in);
if (in.getVersion().before(Version.V_1_4_0_Beta1)) {
assert shard >= 0;
//older nodes will send the concrete index as part of the request
shardId = new ShardId(request.index(), shard);
}
} }
@Override @Override