{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse/ditto/issues/193","repository_url":"https://api.github.com/repos/eclipse/ditto","labels_url":"https://api.github.com/repos/eclipse/ditto/issues/193/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/ditto/issues/193/comments","events_url":"https://api.github.com/repos/eclipse/ditto/issues/193/events","html_url":"https://github.com/eclipse/ditto/issues/193","id":343870383,"node_id":"MDU6SXNzdWUzNDM4NzAzODM=","number":193,"title":"Ditto Things Snaps","user":{"login":"zero-88","id":10863525,"node_id":"MDQ6VXNlcjEwODYzNTI1","avatar_url":"https://avatars2.githubusercontent.com/u/10863525?v=4","gravatar_id":"","url":"https://api.github.com/users/zero-88","html_url":"https://github.com/zero-88","followers_url":"https://api.github.com/users/zero-88/followers","following_url":"https://api.github.com/users/zero-88/following{/other_user}","gists_url":"https://api.github.com/users/zero-88/gists{/gist_id}","starred_url":"https://api.github.com/users/zero-88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zero-88/subscriptions","organizations_url":"https://api.github.com/users/zero-88/orgs","repos_url":"https://api.github.com/users/zero-88/repos","events_url":"https://api.github.com/users/zero-88/events{/privacy}","received_events_url":"https://api.github.com/users/zero-88/received_events","type":"User","site_admin":false},"labels":[{"id":580908956,"node_id":"MDU6TGFiZWw1ODA5MDg5NTY=","url":"https://api.github.com/repos/eclipse/ditto/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-24T03:24:52Z","updated_at":"2018-07-24T06:17:57Z","closed_at":null,"author_association":"NONE","body":"Hello Ditto team,\r\nI would like to know what a role of `things_snaps` table. There is very few document about that.\r\nMy data is grown too fast, in less than 24 hours, it was increase 70GB, almost data is store in `things_snaps`  table. \r\n```json\r\n> db.getCollection('things_snaps').stats(1024 * 1024 * 1024)\r\n{\r\n        \"ns\" : \"things.things_snaps\",\r\n        \"size\" : 225,\r\n        \"count\" : 38962,\r\n        \"avgObjSize\" : 6215555,\r\n        \"storageSize\" : 91\r\n}\r\n```\r\nDoes any configuration and a rule to restrict it?\r\n\r\nI'm using Ditto version `0.3.0-M1`\r\n\r\nThanks in advance"},"comment":{"url":"https://api.github.com/repos/eclipse/ditto/issues/comments/407293791","html_url":"https://github.com/eclipse/ditto/issues/193#issuecomment-407293791","issue_url":"https://api.github.com/repos/eclipse/ditto/issues/193","id":407293791,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzI5Mzc5MQ==","user":{"login":"thjaeckle","id":1331526,"node_id":"MDQ6VXNlcjEzMzE1MjY=","avatar_url":"https://avatars3.githubusercontent.com/u/1331526?v=4","gravatar_id":"","url":"https://api.github.com/users/thjaeckle","html_url":"https://github.com/thjaeckle","followers_url":"https://api.github.com/users/thjaeckle/followers","following_url":"https://api.github.com/users/thjaeckle/following{/other_user}","gists_url":"https://api.github.com/users/thjaeckle/gists{/gist_id}","starred_url":"https://api.github.com/users/thjaeckle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thjaeckle/subscriptions","organizations_url":"https://api.github.com/users/thjaeckle/orgs","repos_url":"https://api.github.com/users/thjaeckle/repos","events_url":"https://api.github.com/users/thjaeckle/events{/privacy}","received_events_url":"https://api.github.com/users/thjaeckle/received_events","type":"User","site_admin":false},"created_at":"2018-07-24T06:17:57Z","updated_at":"2018-07-24T06:17:57Z","author_association":"CONTRIBUTOR","body":"Pong ping ..\r\nIn fact there is a configuration for always having only one snapshot (and deleting the latest one):\r\nhttps://github.com/eclipse/ditto/blob/master/services/things/starter/src/main/resources/things.conf#L68 (just set the environment variable `THING_SNAPSHOT_DELETE_OLD` of the \"things\" service to `true`).\r\nYou could also set `THING_EVENTS_DELETE_OLD` to `true` so that the `things_journal` collection also does not get too big.\r\nWhat these flags do: every time there is a snapshot, the old snapshot and events are deleted.\r\n\r\nThe role of the snapshots collection is to reduce event replaying efforts and time.\r\nAs you probably are aware, Ditto uses [Event Sourcing](https://www.eclipse.org/ditto/basic-signals.html) persisting delta changes in `things_journal` and from time to time (e.g. each [500](https://github.com/eclipse/ditto/blob/master/services/things/starter/src/main/resources/things.conf#L63) events) one snapshot of the complete thing is done to `things_snaps`.\r\n\r\nYour statistics says `\"avgObjSize\" : 6215555` - so I doubt that each entry is 10MB or more."}}
{"actor":{"display_login":"thjaeckle"}}