{"action":"created","issue":{"url":"https://api.github.com/repos/tarantool/tarantool/issues/3173","repository_url":"https://api.github.com/repos/tarantool/tarantool","labels_url":"https://api.github.com/repos/tarantool/tarantool/issues/3173/labels{/name}","comments_url":"https://api.github.com/repos/tarantool/tarantool/issues/3173/comments","events_url":"https://api.github.com/repos/tarantool/tarantool/issues/3173/events","html_url":"https://github.com/tarantool/tarantool/issues/3173","id":298097572,"number":3173,"title":"Vinyl stats are not updated after index file is rebuild","user":{"login":"locker","id":1114511,"avatar_url":"https://avatars2.githubusercontent.com/u/1114511?v=4","gravatar_id":"","url":"https://api.github.com/users/locker","html_url":"https://github.com/locker","followers_url":"https://api.github.com/users/locker/followers","following_url":"https://api.github.com/users/locker/following{/other_user}","gists_url":"https://api.github.com/users/locker/gists{/gist_id}","starred_url":"https://api.github.com/users/locker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/locker/subscriptions","organizations_url":"https://api.github.com/users/locker/orgs","repos_url":"https://api.github.com/users/locker/repos","events_url":"https://api.github.com/users/locker/events{/privacy}","received_events_url":"https://api.github.com/users/locker/received_events","type":"User","site_admin":false},"labels":[{"id":55629184,"url":"https://api.github.com/repos/tarantool/tarantool/labels/bug","name":"bug","color":"eb6420","default":true},{"id":790543593,"url":"https://api.github.com/repos/tarantool/tarantool/labels/recovery","name":"recovery","color":"91f296","default":false},{"id":120488524,"url":"https://api.github.com/repos/tarantool/tarantool/labels/vinyl","name":"vinyl","color":"000000","default":false}],"state":"closed","locked":false,"assignee":{"login":"locker","id":1114511,"avatar_url":"https://avatars2.githubusercontent.com/u/1114511?v=4","gravatar_id":"","url":"https://api.github.com/users/locker","html_url":"https://github.com/locker","followers_url":"https://api.github.com/users/locker/followers","following_url":"https://api.github.com/users/locker/following{/other_user}","gists_url":"https://api.github.com/users/locker/gists{/gist_id}","starred_url":"https://api.github.com/users/locker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/locker/subscriptions","organizations_url":"https://api.github.com/users/locker/orgs","repos_url":"https://api.github.com/users/locker/repos","events_url":"https://api.github.com/users/locker/events{/privacy}","received_events_url":"https://api.github.com/users/locker/received_events","type":"User","site_admin":false},"assignees":[{"login":"locker","id":1114511,"avatar_url":"https://avatars2.githubusercontent.com/u/1114511?v=4","gravatar_id":"","url":"https://api.github.com/users/locker","html_url":"https://github.com/locker","followers_url":"https://api.github.com/users/locker/followers","following_url":"https://api.github.com/users/locker/following{/other_user}","gists_url":"https://api.github.com/users/locker/gists{/gist_id}","starred_url":"https://api.github.com/users/locker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/locker/subscriptions","organizations_url":"https://api.github.com/users/locker/orgs","repos_url":"https://api.github.com/users/locker/repos","events_url":"https://api.github.com/users/locker/events{/privacy}","received_events_url":"https://api.github.com/users/locker/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-02-18T16:28:36Z","updated_at":"2018-02-19T17:45:14Z","closed_at":"2018-02-19T17:45:14Z","author_association":"MEMBER","body":"If an index file is corrupted (or simply absent) and `box.cfg.force_recovery` is set, then it is rebuild on startup. However, statistics are not updated in this case, which is clearly a bug.\r\n```\r\nvlad@esperanza test$ tarantool\r\nTarantool 1.7.7-243-g350b645a\r\ntype 'help' for interactive help\r\ntarantool> box.cfg{log_level = 2}\r\n---\r\n...\r\n\r\ntarantool> _ = box.schema.space.create('test', {engine='vinyl'})\r\n---\r\n...\r\n\r\ntarantool> _ = box.space.test:create_index('pk')\r\n---\r\n...\r\n\r\ntarantool> for i = 1, 100 do box.space.test:insert{i} end\r\n---\r\n...\r\n\r\ntarantool> _ = box.snapshot()\r\n---\r\n...\r\n\r\ntarantool> stat = box.space.test.index.pk:info().disk\r\n---\r\n...\r\n\r\ntarantool> stat.iterator, stat.dump, stat.compact = nil\r\n---\r\n...\r\n\r\ntarantool> stat\r\n---\r\n- index_size: 42\r\n  rows: 100\r\n  bytes: 1308\r\n  pages: 1\r\n  bytes_compressed: 1327\r\n  bloom_size: 4096\r\n...\r\n\r\ntarantool> os.exit()\r\nvlad@esperanza test$ find . -name '*.index' -exec rm '{}' \\;\r\nvlad@esperanza test$ tarantool\r\nTarantool 1.7.7-243-g350b645a\r\ntype 'help' for interactive help\r\ntarantool> box.cfg{log_level = 2, force_recovery = true}\r\n2018-02-18 19:23:59.889 [22840] main/101/interactive xlog.c:1822 !> SystemError failed to open './512/0/00000000000000000001.index' file: No such file or directory\r\n2018-02-18 19:23:59.889 [22840] main/101/interactive vy_run.c:1881 E> failed to load `./512/0/00000000000000000001.index'\r\n---\r\n...\r\n\r\ntarantool> stat = box.space.test.index.pk:info().disk\r\n---\r\n...\r\n\r\ntarantool> stat.iterator, stat.dump, stat.compact = nil\r\n---\r\n...\r\n\r\ntarantool> stat\r\n---\r\n- index_size: 0\r\n  rows: 0\r\n  bytes: 0\r\n  pages: 0\r\n  bytes_compressed: 0\r\n  bloom_size: 4096\r\n...\r\n```"},"comment":{"url":"https://api.github.com/repos/tarantool/tarantool/issues/comments/366762680","html_url":"https://github.com/tarantool/tarantool/issues/3173#issuecomment-366762680","issue_url":"https://api.github.com/repos/tarantool/tarantool/issues/3173","id":366762680,"user":{"login":"locker","id":1114511,"avatar_url":"https://avatars2.githubusercontent.com/u/1114511?v=4","gravatar_id":"","url":"https://api.github.com/users/locker","html_url":"https://github.com/locker","followers_url":"https://api.github.com/users/locker/followers","following_url":"https://api.github.com/users/locker/following{/other_user}","gists_url":"https://api.github.com/users/locker/gists{/gist_id}","starred_url":"https://api.github.com/users/locker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/locker/subscriptions","organizations_url":"https://api.github.com/users/locker/orgs","repos_url":"https://api.github.com/users/locker/repos","events_url":"https://api.github.com/users/locker/events{/privacy}","received_events_url":"https://api.github.com/users/locker/received_events","type":"User","site_admin":false},"created_at":"2018-02-19T17:45:14Z","updated_at":"2018-02-19T17:45:14Z","author_association":"MEMBER","body":"Fixed by 400277bf22fe8d5ac34f7597a690153d3a1e88a1"}}
{"actor":{"display_login":"locker"}}