Skip to content

Commit

Permalink
No need for mutex, just read shardRouting once
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveCTurner committed May 30, 2018
1 parent 903ef15 commit 1d4e044
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2066,9 +2066,8 @@ public void startRecovery(RecoveryState recoveryState, PeerRecoveryTargetService
}

public ShardStateMetaData getShardStateMetaData() {
synchronized (mutex) {
return new ShardStateMetaData(shardRouting.primary(), indexSettings.getUUID(), shardRouting.allocationId());
}
final ShardRouting shardRouting = this.shardRouting;
return new ShardStateMetaData(shardRouting.primary(), indexSettings.getUUID(), shardRouting.allocationId());
}

/**
Expand Down

0 comments on commit 1d4e044

Please sign in to comment.