{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/15814","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/15814/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/15814/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/15814/events","html_url":"https://github.com/elastic/elasticsearch/issues/15814","id":125318316,"number":15814,"title":"Translog size not effectively limited by index.translog.flush_threshold_size?","user":{"login":"aquarapid","id":772642,"avatar_url":"https://avatars.githubusercontent.com/u/772642?v=3","gravatar_id":"","url":"https://api.github.com/users/aquarapid","html_url":"https://github.com/aquarapid","followers_url":"https://api.github.com/users/aquarapid/followers","following_url":"https://api.github.com/users/aquarapid/following{/other_user}","gists_url":"https://api.github.com/users/aquarapid/gists{/gist_id}","starred_url":"https://api.github.com/users/aquarapid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aquarapid/subscriptions","organizations_url":"https://api.github.com/users/aquarapid/orgs","repos_url":"https://api.github.com/users/aquarapid/repos","events_url":"https://api.github.com/users/aquarapid/events{/privacy}","received_events_url":"https://api.github.com/users/aquarapid/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-07T04:12:21Z","updated_at":"2016-01-07T17:18:39Z","closed_at":"2016-01-07T17:18:39Z","body":"I have a logstash index in my ES 2.1.1 cluster (2 nodes):\r\n\r\n```\r\n{\r\n  \"logstash-2016.01.07\" : {\r\n    \"settings\" : {\r\n      \"index\" : {\r\n        \"refresh_interval\" : \"30s\",\r\n        \"number_of_shards\" : \"8\",\r\n        \"translog\" : {\r\n          \"flush_threshold_ops\" : \"100000\",\r\n          \"flush_threshold_size\" : \"1gb\",\r\n          \"sync_interval\" : \"5s\",\r\n          \"durability\" : \"async\"\r\n        },\r\n        \"query\" : {\r\n          \"default_field\" : \"body\"\r\n        },\r\n        \"creation_date\" : \"1452124822948\",\r\n        \"store\" : {\r\n          \"compress\" : {\r\n            \"stored\" : \"true\"\r\n          }\r\n        },\r\n        \"number_of_replicas\" : \"1\",\r\n        \"uuid\" : \"XXXXX\",\r\n        \"version\" : {\r\n          \"created\" : \"2010199\"\r\n        }\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nSo, the translogs should be limited in size.  However:\r\n\r\n```\r\nOn one node:\r\n\r\n# du -sh /disk*/logstash/nodes/0/indices/logstash-2016.01.07/*/translog/*.tlog\r\n3.1G\t/disk10/logstash/nodes/0/indices/logstash-2016.01.07/2/translog/translog-1.tlog\r\n40M\t/disk11/logstash/nodes/0/indices/logstash-2016.01.07/1/translog/translog-35.tlog\r\n44M\t/disk12/logstash/nodes/0/indices/logstash-2016.01.07/3/translog/translog-35.tlog\r\n44M\t/disk1/logstash/nodes/0/indices/logstash-2016.01.07/0/translog/translog-35.tlog\r\n3.0G\t/disk2/logstash/nodes/0/indices/logstash-2016.01.07/7/translog/translog-1.tlog\r\n3.0G\t/disk3/logstash/nodes/0/indices/logstash-2016.01.07/4/translog/translog-1.tlog\r\n39M\t/disk4/logstash/nodes/0/indices/logstash-2016.01.07/6/translog/translog-35.tlog\r\n50M\t/disk5/logstash/nodes/0/indices/logstash-2016.01.07/5/translog/translog-35.tlog\r\n```\r\n\r\nand the other:\r\n\r\n```\r\n# du -sh /disk*/logstash/nodes/0/indices/logstash-2016.01.07/*/translog/*.tlog\r\n2.7G\t/disk11/logstash/nodes/0/indices/logstash-2016.01.07/6/translog/translog-1.tlog\r\n3.1G\t/disk12/logstash/nodes/0/indices/logstash-2016.01.07/0/translog/translog-1.tlog\r\n30M\t/disk1/logstash/nodes/0/indices/logstash-2016.01.07/7/translog/translog-35.tlog\r\n38M\t/disk2/logstash/nodes/0/indices/logstash-2016.01.07/4/translog/translog-35.tlog\r\n2.9G\t/disk3/logstash/nodes/0/indices/logstash-2016.01.07/5/translog/translog-1.tlog\r\n45M\t/disk6/logstash/nodes/0/indices/logstash-2016.01.07/2/translog/translog-35.tlog\r\n3.0G\t/disk7/logstash/nodes/0/indices/logstash-2016.01.07/3/translog/translog-1.tlog\r\n3.0G\t/disk9/logstash/nodes/0/indices/logstash-2016.01.07/1/translog/translog-1.tlog\r\n```\r\n\r\nSo it seems the translog size is not being limited to the 1GB set in flush_threshold_size?  Or do I misunderstand something here?"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/169737136","html_url":"https://github.com/elastic/elasticsearch/issues/15814#issuecomment-169737136","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/15814","id":169737136,"user":{"login":"bleskes","id":1006375,"avatar_url":"https://avatars.githubusercontent.com/u/1006375?v=3","gravatar_id":"","url":"https://api.github.com/users/bleskes","html_url":"https://github.com/bleskes","followers_url":"https://api.github.com/users/bleskes/followers","following_url":"https://api.github.com/users/bleskes/following{/other_user}","gists_url":"https://api.github.com/users/bleskes/gists{/gist_id}","starred_url":"https://api.github.com/users/bleskes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleskes/subscriptions","organizations_url":"https://api.github.com/users/bleskes/orgs","repos_url":"https://api.github.com/users/bleskes/repos","events_url":"https://api.github.com/users/bleskes/events{/privacy}","received_events_url":"https://api.github.com/users/bleskes/received_events","type":"User","site_admin":false},"created_at":"2016-01-07T17:18:39Z","updated_at":"2016-01-07T17:18:39Z","body":"thanks @aquarapid . We spend some time on this and believe to have found the issue (see #15830) . That Pr explains the issue if you don't have short periods of 5m without indexing.  I'm going to close this for now, please let me know if that's not the case.\r\n\r\nThanks so much for reporting this. It led us to find an important bug. You can use the _flush api to force the translog to be trimmed."}}