Skip to content

Commit 0145a41

Browse files
authored
Log more data for PrevalidateShardPathIT#testCheckShards (#109887)
`PrevalidateShardPathIT#testCheckShards` still keeps failing on CI, so we need more logging. * Add debug logging for `MasterService` events to verify that a cluster service update is triggered. * Log explanation for stuck shards regardless whether they are located on node_2 in the cluster state. See #104807
1 parent b65e02c commit 0145a41

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

muted-tests.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,6 @@ tests:
6767
- class: "org.elasticsearch.xpack.shutdown.NodeShutdownReadinessIT"
6868
issue: "https://github.com/elastic/elasticsearch/issues/109838"
6969
method: "testShutdownReadinessService"
70-
- class: "org.elasticsearch.cluster.PrevalidateShardPathIT"
71-
issue: "https://github.com/elastic/elasticsearch/issues/104807"
72-
method: "testCheckShards"
7370
- class: "org.elasticsearch.packaging.test.RpmPreservationTests"
7471
issue: "https://github.com/elastic/elasticsearch/issues/109898"
7572
method: "test30PreserveConfig"
@@ -82,6 +79,7 @@ tests:
8279
issue: "https://github.com/elastic/elasticsearch/issues/109915"
8380
method: "testRandomMultiValuesTopN"
8481

82+
8583
# Examples:
8684
#
8785
# Mute a single test case in a YAML test suite:

server/src/internalClusterTest/java/org/elasticsearch/cluster/PrevalidateShardPathIT.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import org.elasticsearch.common.xcontent.ChunkedToXContent;
2323
import org.elasticsearch.index.shard.ShardId;
2424
import org.elasticsearch.test.ESIntegTestCase;
25+
import org.elasticsearch.test.junit.annotations.TestLogging;
2526

2627
import java.util.HashSet;
2728
import java.util.List;
@@ -39,6 +40,10 @@
3940
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
4041
public class PrevalidateShardPathIT extends ESIntegTestCase {
4142

43+
@TestLogging(
44+
value = "org.elasticsearch.cluster.service.MasterService:DEBUG",
45+
reason = "https://github.com/elastic/elasticsearch/issues/104807"
46+
)
4247
public void testCheckShards() throws Exception {
4348
internalCluster().startMasterOnlyNode();
4449
String node1 = internalCluster().startDataOnlyNode();
@@ -95,7 +100,6 @@ public void testCheckShards() throws Exception {
95100
.allShards()
96101
.filter(s -> s.getIndexName().equals(indexName))
97102
.filter(s -> node2ShardIds.contains(s.shardId()))
98-
.filter(s -> s.currentNodeId().equals(node2Id))
99103
.toList();
100104
logger.info("Found {} shards on the relocation source node {} in the cluster state", node2Shards, node2Id);
101105
for (var node2Shard : node2Shards) {

0 commit comments

Comments
 (0)