{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/beats/pulls/comments/60036469","id":60036469,"diff_hunk":"@@ -37,6 +40,9 @@ def test_registrar_file_content(self):\n                 \"Processing 5 events\"),\n             max_timeout=15)\n \n+        # Wait 2s to make sure the state is written once again\n+        time.sleep(2)","path":"filebeat/tests/system/test_registrar.py","position":15,"original_position":15,"commit_id":"971231dc0d046bcbc9e787c26c0fc6959704fefb","original_commit_id":"bf9f698846021379a359f2138176ff6538e1bda0","user":{"login":"urso","id":75886,"avatar_url":"https://avatars.githubusercontent.com/u/75886?v=3","gravatar_id":"","url":"https://api.github.com/users/urso","html_url":"https://github.com/urso","followers_url":"https://api.github.com/users/urso/followers","following_url":"https://api.github.com/users/urso/following{/other_user}","gists_url":"https://api.github.com/users/urso/gists{/gist_id}","starred_url":"https://api.github.com/users/urso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urso/subscriptions","organizations_url":"https://api.github.com/users/urso/orgs","repos_url":"https://api.github.com/users/urso/repos","events_url":"https://api.github.com/users/urso/events{/privacy}","received_events_url":"https://api.github.com/users/urso/received_events","type":"User","site_admin":false},"body":"wait_until has configurable timeout, no? No need for sleep.","created_at":"2016-04-18T10:30:24Z","updated_at":"2016-04-18T10:30:24Z","html_url":"https://github.com/elastic/beats/pull/1375#discussion_r60036469","pull_request_url":"https://api.github.com/repos/elastic/beats/pulls/1375","_links":{"self":{"href":"https://api.github.com/repos/elastic/beats/pulls/comments/60036469"},"html":{"href":"https://github.com/elastic/beats/pull/1375#discussion_r60036469"},"pull_request":{"href":"https://api.github.com/repos/elastic/beats/pulls/1375"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/beats/pulls/1375","id":66118110,"html_url":"https://github.com/elastic/beats/pull/1375","diff_url":"https://github.com/elastic/beats/pull/1375.diff","patch_url":"https://github.com/elastic/beats/pull/1375.patch","issue_url":"https://api.github.com/repos/elastic/beats/issues/1375","number":1375,"state":"open","locked":false,"title":"Fix filebeat file rotation registrar issue #1281","user":{"login":"ruflin","id":244900,"avatar_url":"https://avatars.githubusercontent.com/u/244900?v=3","gravatar_id":"","url":"https://api.github.com/users/ruflin","html_url":"https://github.com/ruflin","followers_url":"https://api.github.com/users/ruflin/followers","following_url":"https://api.github.com/users/ruflin/following{/other_user}","gists_url":"https://api.github.com/users/ruflin/gists{/gist_id}","starred_url":"https://api.github.com/users/ruflin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruflin/subscriptions","organizations_url":"https://api.github.com/users/ruflin/orgs","repos_url":"https://api.github.com/users/ruflin/repos","events_url":"https://api.github.com/users/ruflin/events{/privacy}","received_events_url":"https://api.github.com/users/ruflin/received_events","type":"User","site_admin":false},"body":"When multiple files were rotated at the same time, the first rotation was overwriting the states for the other rotated files. This happened because the new file directly had new content inside and the state for all the other files was fetched from disk, resetting the changes which were in memory.\r\n\r\nThe problem is now fixed by not writing the state to disk every time state changes are discovered by the registrar, as it is up to the prospector to decide if these changes are the most recent ones. Now changes get written to disk every time a scan is done. The downside of this solution is that the registrar is also updated, if no changes did happen.\r\n\r\n* System test added to verify that issue is fixed\r\n* Closes #1281","created_at":"2016-04-12T08:26:36Z","updated_at":"2016-04-18T10:30:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0748c6c3fb5c2a01920673c81bcfa39d9d2b5d30","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/elastic/beats/pulls/1375/commits","review_comments_url":"https://api.github.com/repos/elastic/beats/pulls/1375/comments","review_comment_url":"https://api.github.com/repos/elastic/beats/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/beats/issues/1375/comments","statuses_url":"https://api.github.com/repos/elastic/beats/statuses/971231dc0d046bcbc9e787c26c0fc6959704fefb","head":{"label":"ruflin:fb-registry","ref":"fb-registry","sha":"971231dc0d046bcbc9e787c26c0fc6959704fefb","user":{"login":"ruflin","id":244900,"avatar_url":"https://avatars.githubusercontent.com/u/244900?v=3","gravatar_id":"","url":"https://api.github.com/users/ruflin","html_url":"https://github.com/ruflin","followers_url":"https://api.github.com/users/ruflin/followers","following_url":"https://api.github.com/users/ruflin/following{/other_user}","gists_url":"https://api.github.com/users/ruflin/gists{/gist_id}","starred_url":"https://api.github.com/users/ruflin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruflin/subscriptions","organizations_url":"https://api.github.com/users/ruflin/orgs","repos_url":"https://api.github.com/users/ruflin/repos","events_url":"https://api.github.com/users/ruflin/events{/privacy}","received_events_url":"https://api.github.com/users/ruflin/received_events","type":"User","site_admin":false},"repo":{"id":40544282,"name":"beats","full_name":"ruflin/beats","owner":{"login":"ruflin","id":244900,"avatar_url":"https://avatars.githubusercontent.com/u/244900?v=3","gravatar_id":"","url":"https://api.github.com/users/ruflin","html_url":"https://github.com/ruflin","followers_url":"https://api.github.com/users/ruflin/followers","following_url":"https://api.github.com/users/ruflin/following{/other_user}","gists_url":"https://api.github.com/users/ruflin/gists{/gist_id}","starred_url":"https://api.github.com/users/ruflin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruflin/subscriptions","organizations_url":"https://api.github.com/users/ruflin/orgs","repos_url":"https://api.github.com/users/ruflin/repos","events_url":"https://api.github.com/users/ruflin/events{/privacy}","received_events_url":"https://api.github.com/users/ruflin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ruflin/beats","description":"Beats - Lightweight shippers for Elasticsearch & Logstash","fork":true,"url":"https://api.github.com/repos/ruflin/beats","forks_url":"https://api.github.com/repos/ruflin/beats/forks","keys_url":"https://api.github.com/repos/ruflin/beats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ruflin/beats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ruflin/beats/teams","hooks_url":"https://api.github.com/repos/ruflin/beats/hooks","issue_events_url":"https://api.github.com/repos/ruflin/beats/issues/events{/number}","events_url":"https://api.github.com/repos/ruflin/beats/events","assignees_url":"https://api.github.com/repos/ruflin/beats/assignees{/user}","branches_url":"https://api.github.com/repos/ruflin/beats/branches{/branch}","tags_url":"https://api.github.com/repos/ruflin/beats/tags","blobs_url":"https://api.github.com/repos/ruflin/beats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ruflin/beats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ruflin/beats/git/refs{/sha}","trees_url":"https://api.github.com/repos/ruflin/beats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ruflin/beats/statuses/{sha}","languages_url":"https://api.github.com/repos/ruflin/beats/languages","stargazers_url":"https://api.github.com/repos/ruflin/beats/stargazers","contributors_url":"https://api.github.com/repos/ruflin/beats/contributors","subscribers_url":"https://api.github.com/repos/ruflin/beats/subscribers","subscription_url":"https://api.github.com/repos/ruflin/beats/subscription","commits_url":"https://api.github.com/repos/ruflin/beats/commits{/sha}","git_commits_url":"https://api.github.com/repos/ruflin/beats/git/commits{/sha}","comments_url":"https://api.github.com/repos/ruflin/beats/comments{/number}","issue_comment_url":"https://api.github.com/repos/ruflin/beats/issues/comments{/number}","contents_url":"https://api.github.com/repos/ruflin/beats/contents/{+path}","compare_url":"https://api.github.com/repos/ruflin/beats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ruflin/beats/merges","archive_url":"https://api.github.com/repos/ruflin/beats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ruflin/beats/downloads","issues_url":"https://api.github.com/repos/ruflin/beats/issues{/number}","pulls_url":"https://api.github.com/repos/ruflin/beats/pulls{/number}","milestones_url":"https://api.github.com/repos/ruflin/beats/milestones{/number}","notifications_url":"https://api.github.com/repos/ruflin/beats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ruflin/beats/labels{/name}","releases_url":"https://api.github.com/repos/ruflin/beats/releases{/id}","deployments_url":"https://api.github.com/repos/ruflin/beats/deployments","created_at":"2015-08-11T13:49:02Z","updated_at":"2016-01-19T03:22:25Z","pushed_at":"2016-04-18T10:25:46Z","git_url":"git://github.com/ruflin/beats.git","ssh_url":"git@github.com:ruflin/beats.git","clone_url":"https://github.com/ruflin/beats.git","svn_url":"https://github.com/ruflin/beats","homepage":"https://www.elastic.co/products/beats","size":32916,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"elastic:master","ref":"master","sha":"08204a28bdcf3a0bc18ac390bf0aaf09291c8d6d","user":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":16554739,"name":"beats","full_name":"elastic/beats","owner":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elastic/beats","description":"Beats - Lightweight shippers for Elasticsearch & Logstash ","fork":false,"url":"https://api.github.com/repos/elastic/beats","forks_url":"https://api.github.com/repos/elastic/beats/forks","keys_url":"https://api.github.com/repos/elastic/beats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/beats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/beats/teams","hooks_url":"https://api.github.com/repos/elastic/beats/hooks","issue_events_url":"https://api.github.com/repos/elastic/beats/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/beats/events","assignees_url":"https://api.github.com/repos/elastic/beats/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/beats/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/beats/tags","blobs_url":"https://api.github.com/repos/elastic/beats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/beats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/beats/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/beats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/beats/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/beats/languages","stargazers_url":"https://api.github.com/repos/elastic/beats/stargazers","contributors_url":"https://api.github.com/repos/elastic/beats/contributors","subscribers_url":"https://api.github.com/repos/elastic/beats/subscribers","subscription_url":"https://api.github.com/repos/elastic/beats/subscription","commits_url":"https://api.github.com/repos/elastic/beats/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/beats/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/beats/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/beats/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/beats/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/beats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/beats/merges","archive_url":"https://api.github.com/repos/elastic/beats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/beats/downloads","issues_url":"https://api.github.com/repos/elastic/beats/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/beats/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/beats/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/beats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/beats/labels{/name}","releases_url":"https://api.github.com/repos/elastic/beats/releases{/id}","deployments_url":"https://api.github.com/repos/elastic/beats/deployments","created_at":"2014-02-05T19:01:02Z","updated_at":"2016-04-18T06:10:55Z","pushed_at":"2016-04-18T10:25:46Z","git_url":"git://github.com/elastic/beats.git","ssh_url":"git@github.com:elastic/beats.git","clone_url":"https://github.com/elastic/beats.git","svn_url":"https://github.com/elastic/beats","homepage":"https://www.elastic.co/products/beats","size":33205,"stargazers_count":2636,"watchers_count":2636,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":389,"mirror_url":null,"open_issues_count":237,"forks":389,"open_issues":237,"watchers":2636,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/beats/pulls/1375"},"html":{"href":"https://github.com/elastic/beats/pull/1375"},"issue":{"href":"https://api.github.com/repos/elastic/beats/issues/1375"},"comments":{"href":"https://api.github.com/repos/elastic/beats/issues/1375/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/beats/pulls/1375/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/beats/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/beats/pulls/1375/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/beats/statuses/971231dc0d046bcbc9e787c26c0fc6959704fefb"}}}}