Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reference/ccr/apis/get-ccr-stats/line_94 docs test failure #48700

Closed
martijnvg opened this issue Oct 30, 2019 · 3 comments · Fixed by #48901
Closed

reference/ccr/apis/get-ccr-stats/line_94 docs test failure #48700

martijnvg opened this issue Oct 30, 2019 · 3 comments · Fixed by #48901
Assignees
Labels
:Distributed Indexing/CCR Issues around the Cross Cluster State Replication features >test-failure Triaged test failures from CI

Comments

@martijnvg
Copy link
Member

java.lang.AssertionError: 
Failure at [reference/ccr/apis/get-ccr-stats:75]: $body didn't match expected value:
                         $body: 
               auto_follow_stats: 
            auto_followed_clusters: 
                                   0: 
                          cluster_name: same [remote_cluster]
            last_seen_metadata_version: same [11613]
          time_since_last_check_millis: same [0]
    number_of_failed_follow_indices: same [0]
    number_of_failed_remote_cluster_state_requests: same [3]
    number_of_successful_follow_indices: same [3]
         recent_auto_follow_errors: 
                                   0: 
                 auto_follow_exception: 
                               caused_by: 
                                 caused_by: 
                                   caused_by: 
                                        reason: same [[node-0][127.0.0.1:36317][cluster:monitor/xpack/in...]
                                          type: same [node_disconnected_exception]
                                      reason: same [could not determine the license type for cluster [...]
                                        type: same [exception]
                                    reason: same [can not fetch remote cluster state as the license ...]
                                      type: same [status_exception]
                                  reason: same [ElasticsearchStatusException[can not fetch remote ...]
                                    type: same [exception]
                          leader_index: same [my_auto_follow_pattern]
                             timestamp: same [1572451902549]
                    follow_stats: 
                           indices: 
                                   0: 
                                 index: same [follower_index]
                                shards: 
                                       0: 
                                bytes_read: same [0]
                      failed_read_requests: same [0]
                     failed_write_requests: same [0]
                  follower_aliases_version: same [0]
                follower_global_checkpoint: same [-1]
                            follower_index: same [follower_index]
                  follower_mapping_version: same [0]
                       follower_max_seq_no: same [-1]
                 follower_settings_version: same [0]
                     last_requested_seq_no: same [-1]
                  leader_global_checkpoint: same [-1]
                              leader_index: same [leader_index]
                         leader_max_seq_no: same [-1]
                           operations_read: same [0]
                        operations_written: same [0]
                 outstanding_read_requests: same [0]
                outstanding_write_requests: same [0]
                           read_exceptions: same [empty list]
                            remote_cluster: same [remote_cluster]
                                  shard_id: same [0]
                  successful_read_requests: same [0]
                 successful_write_requests: same [0]
               time_since_last_read_millis: same [-1]
            total_read_remote_exec_time_millis: same [0]
                    total_read_time_millis: same [0]
                   total_write_time_millis: same [0]
              write_buffer_operation_count: same [0]
                write_buffer_size_in_bytes: same [0]
      received [1] more entries than expected

See last line (^).

Build url: https://gradle-enterprise.elastic.co/s/6vk2bsh6vsdem/tests/jbm2x6tnwtxku-etwxtlodvtjas

This test failed 3 times already today.

@martijnvg martijnvg added >test-failure Triaged test failures from CI :Distributed Indexing/CCR Issues around the Cross Cluster State Replication features labels Oct 30, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (:Distributed/CCR)

@jrodewig
Copy link
Contributor

jrodewig commented Nov 7, 2019

@ywelsch
Copy link
Contributor

ywelsch commented Nov 7, 2019

Reproduced this by using ./gradlew ':docs:integTestRunner' --tests "org.elasticsearch.smoketest.DocsClientYamlTestSuiteIT.test {yaml=reference/ccr/*}" and inserting a Thread.sleep(10000) in ShardFollowTaskCleaner just before client.execute(CompletionPersistentTaskAction.INSTANCE, request, ....

I've created a fix in #48901

ywelsch added a commit that referenced this issue Nov 8, 2019
CCR follower stats can return information for persistent tasks that are in the process of being cleaned up. This is problematic for tests where CCR follower indices have been deleted, but their persistent follower task is only cleaned up asynchronously afterwards. If one of the following tests then accesses the follower stats, it might still get the stats for that follower task.

In addition, some tests were not cleaning up their auto-follow patterns, leaving orphaned patterns behind. Other tests cleaned up their auto-follow patterns. As always the same name was used, it just depended on the test execution order whether this led to a failure or not. This commit fixes the offensive tests, and will also automatically remove auto-follow-patterns at the end of tests, like we do for many other features.

Closes #48700
ywelsch added a commit that referenced this issue Nov 8, 2019
CCR follower stats can return information for persistent tasks that are in the process of being cleaned up. This is problematic for tests where CCR follower indices have been deleted, but their persistent follower task is only cleaned up asynchronously afterwards. If one of the following tests then accesses the follower stats, it might still get the stats for that follower task.

In addition, some tests were not cleaning up their auto-follow patterns, leaving orphaned patterns behind. Other tests cleaned up their auto-follow patterns. As always the same name was used, it just depended on the test execution order whether this led to a failure or not. This commit fixes the offensive tests, and will also automatically remove auto-follow-patterns at the end of tests, like we do for many other features.

Closes #48700
ywelsch added a commit that referenced this issue Nov 8, 2019
CCR follower stats can return information for persistent tasks that are in the process of being cleaned up. This is problematic for tests where CCR follower indices have been deleted, but their persistent follower task is only cleaned up asynchronously afterwards. If one of the following tests then accesses the follower stats, it might still get the stats for that follower task.

In addition, some tests were not cleaning up their auto-follow patterns, leaving orphaned patterns behind. Other tests cleaned up their auto-follow patterns. As always the same name was used, it just depended on the test execution order whether this led to a failure or not. This commit fixes the offensive tests, and will also automatically remove auto-follow-patterns at the end of tests, like we do for many other features.

Closes #48700
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Indexing/CCR Issues around the Cross Cluster State Replication features >test-failure Triaged test failures from CI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants