{"action":"created","issue":{"url":"https://api.github.com/repos/basho/riak_kv/issues/1471","repository_url":"https://api.github.com/repos/basho/riak_kv","labels_url":"https://api.github.com/repos/basho/riak_kv/issues/1471/labels{/name}","comments_url":"https://api.github.com/repos/basho/riak_kv/issues/1471/comments","events_url":"https://api.github.com/repos/basho/riak_kv/issues/1471/events","html_url":"https://github.com/basho/riak_kv/issues/1471","id":174428265,"number":1471,"title":"Riak KV memory backend did't discarding oldest objects when met max memory [JIRA: RIAK-2781]","user":{"login":"johnzhou2011","id":6656559,"avatar_url":"https://avatars.githubusercontent.com/u/6656559?v=3","gravatar_id":"","url":"https://api.github.com/users/johnzhou2011","html_url":"https://github.com/johnzhou2011","followers_url":"https://api.github.com/users/johnzhou2011/followers","following_url":"https://api.github.com/users/johnzhou2011/following{/other_user}","gists_url":"https://api.github.com/users/johnzhou2011/gists{/gist_id}","starred_url":"https://api.github.com/users/johnzhou2011/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnzhou2011/subscriptions","organizations_url":"https://api.github.com/users/johnzhou2011/orgs","repos_url":"https://api.github.com/users/johnzhou2011/repos","events_url":"https://api.github.com/users/johnzhou2011/events{/privacy}","received_events_url":"https://api.github.com/users/johnzhou2011/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/basho/riak_kv/labels/JIRA:%20To%20Do","name":"JIRA: To Do","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-01T03:25:45Z","updated_at":"2016-09-18T02:29:45Z","closed_at":null,"body":"## ENV \r\nOS: CenterOS 6.5\r\nRiak KV:2.1.4\r\nInstalled by:\r\n> wget http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.4/rhel/6/riak-2.1.4-1.el6.x86_64.rpm\r\nsudo rpm -Uvh riak-2.1.4-1.el6.x86_64.rpm\r\n\r\n## My Setting:\r\n> storage_backend = multi\r\nmulti_backend.bitcask_multi.storage_backend = bitcask\r\nmulti_backend.bitcask_multi.bitcask.data_root = /var/lib/riak/bitcask_mult\r\nmulti_backend.memory_multi.storage_backend = memory\r\nmulti_backend.memory_multi.memory_backend.max_memory_per_vnode = 2MB\r\nmulti_backend.default = memory_multi\r\n\r\n## Document\r\n[http://docs.basho.com/riak/kv/2.1.4/setup/planning/backend/memory/](url)\r\n\r\n> When the threshold value that you set has been met in a particular vnode, **Riak will begin discarding objects, beginning with the _oldest_ object** and proceeding until memory usage returns below the allowable threshold.\r\nYou can configure maximum memory using the memory_backend.max_memory_per_vnode setting. You can specify max_memory_per_vnode however you’d like, using kilobytes, megabytes, or even gigabytes.\r\n>\r\n\r\n## Setps\r\n1.Use sh to Loop POST [512kb] files (0.ts,index.m3u8,1.ts,index.m3u8,2.ts,index.m3u8........)\r\n2.When meet the max memory 2 MB, some object discarded but not beginning with the oldest object(index.m3u8 discarded)\r\n[curl.sh.txt](https://github.com/basho/riak_kv/files/448751/curl.sh.txt)\r\n\r\nhttp://10.20.122.45:8098/buckets/test/keys?keys=true\r\n> {\"keys\":[\"217.ts\",\"212.ts\",\"203.ts\",\"210.ts\",\"173.ts\",\"166.ts\",\"200.ts\",\"199.ts\",\"192.ts\",\"215.ts\",\"129.ts\",\"124.ts\",\"208.ts\",\"179.ts\",\"198.ts\",\"196.ts\",\"185.ts\",\"97.ts\",\"219.ts\",\"114.ts\",\"201.ts\",\"190.ts\",\"165.ts\",\"223.ts\",\"220.ts\",\"214.ts\",\"222.ts\",\"211.ts\",\"209.ts\",\"213.ts\",\"183.ts\",\"143.ts\",\"205.ts\",\"171.ts\",\"139.ts\",\"66.ts\",\"142.ts\",\"122.ts\",\"216.ts\",\"170.ts\",\"162.ts\",\"194.ts\",\"119.ts\",\"105.ts\",\"178.ts\",\"160.ts\",\"158.ts\",\"221.ts\",\"193.ts\",\"187.ts\",\"197.ts\",\"159.ts\",\"155.ts\",\"218.ts\",\"207.ts\",\"184.ts\",\"188.ts\",\"181.ts\",\"176.ts\",\"206.ts\",\"202.ts\",\"195.ts\"]}"},"comment":{"url":"https://api.github.com/repos/basho/riak_kv/issues/comments/247820454","html_url":"https://github.com/basho/riak_kv/issues/1471#issuecomment-247820454","issue_url":"https://api.github.com/repos/basho/riak_kv/issues/1471","id":247820454,"user":{"login":"johnzhou2011","id":6656559,"avatar_url":"https://avatars.githubusercontent.com/u/6656559?v=3","gravatar_id":"","url":"https://api.github.com/users/johnzhou2011","html_url":"https://github.com/johnzhou2011","followers_url":"https://api.github.com/users/johnzhou2011/followers","following_url":"https://api.github.com/users/johnzhou2011/following{/other_user}","gists_url":"https://api.github.com/users/johnzhou2011/gists{/gist_id}","starred_url":"https://api.github.com/users/johnzhou2011/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnzhou2011/subscriptions","organizations_url":"https://api.github.com/users/johnzhou2011/orgs","repos_url":"https://api.github.com/users/johnzhou2011/repos","events_url":"https://api.github.com/users/johnzhou2011/events{/privacy}","received_events_url":"https://api.github.com/users/johnzhou2011/received_events","type":"User","site_admin":false},"created_at":"2016-09-18T02:29:45Z","updated_at":"2016-09-18T02:29:45Z","body":"@John Daily\r\nHi, John. Any idea about this?"}}
{"actor":{"display_login":"johnzhou2011"}}