diff --git a/esrally/mechanic/telemetry.py b/esrally/mechanic/telemetry.py index a8bcf5a56..e1d750eca 100644 --- a/esrally/mechanic/telemetry.py +++ b/esrally/mechanic/telemetry.py @@ -411,12 +411,11 @@ def record_stats_per_index(self, name, stats): """ for shard_stats in stats: - shard_id = shard_stats.get("shard_id", None) - if shard_id is not None: + if "shard_id" in shard_stats: shard_metadata = { "cluster": self.cluster_name, "index": name, - "shard": shard_id, + "shard": shard_stats["shard_id"], "name": "ccr-stats" }