Skip to content

Commit

Permalink
Less usage of primaryShardReference
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveCTurner committed Apr 15, 2019
1 parent 1350c0f commit a26a986
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,10 @@ public void handleException(TransportException exp) {
onCompletionListener.onResponse(response);
}, e -> handleException(primaryShardReference, e));

final IndexShard shard = primaryShardReference.indexShard;

final ActionListener<Response> globalCheckpointSyncingListener = ActionListener.wrap(response -> {
if (syncGlobalCheckpointAfterOperation) {
final IndexShard shard = primaryShardReference.indexShard;
try {
shard.maybeSyncGlobalCheckpoint("post-operation");
} catch (final Exception e) {
Expand All @@ -376,7 +377,8 @@ public void handleException(TransportException exp) {
// intentionally swallow, a missed global checkpoint sync should not fail this operation
logger.info(
new ParameterizedMessage(
"{} failed to execute post-operation global checkpoint sync", shard.shardId()), e);
"{} failed to execute post-operation global checkpoint sync",
primaryShardReference.routingEntry().shardId()), e);
}
}
}
Expand Down

0 comments on commit a26a986

Please sign in to comment.