{"action":"created","issue":{"url":"https://api.github.com/repos/prooph/proophessor-do-symfony/issues/17","repository_url":"https://api.github.com/repos/prooph/proophessor-do-symfony","labels_url":"https://api.github.com/repos/prooph/proophessor-do-symfony/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/prooph/proophessor-do-symfony/issues/17/comments","events_url":"https://api.github.com/repos/prooph/proophessor-do-symfony/issues/17/events","html_url":"https://github.com/prooph/proophessor-do-symfony/issues/17","id":273469538,"number":17,"title":"Duplcate key violation while create projections","user":{"login":"Adapik","id":10532067,"avatar_url":"https://avatars2.githubusercontent.com/u/10532067?v=4","gravatar_id":"","url":"https://api.github.com/users/Adapik","html_url":"https://github.com/Adapik","followers_url":"https://api.github.com/users/Adapik/followers","following_url":"https://api.github.com/users/Adapik/following{/other_user}","gists_url":"https://api.github.com/users/Adapik/gists{/gist_id}","starred_url":"https://api.github.com/users/Adapik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Adapik/subscriptions","organizations_url":"https://api.github.com/users/Adapik/orgs","repos_url":"https://api.github.com/users/Adapik/repos","events_url":"https://api.github.com/users/Adapik/events{/privacy}","received_events_url":"https://api.github.com/users/Adapik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-11-13T15:27:52Z","updated_at":"2017-11-20T15:07:47Z","closed_at":null,"author_association":"NONE","body":"I've noticed several times \"stream position\" in table \"projections\" is less then expected (I've got unique constraint violation i my read table when event proceed twice).\r\n\r\nTo reproduce a bug I've added a simple console command \r\n\r\nhttps://github.com/Adapik/proophessor-do-symfony/commit/4dfe0be513f6c7f9c25607445bbc5d3a56c2f447\r\n\r\nTo run it just run `bin/console test:run`\r\n\r\nIt fills event store with events. Now when running `bin/console event-store:projection:run user_projection` or `bin/console event-store:projection:run todo_projection` I've got a DBAL Exception:\r\n\r\n`\r\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'a82d2b4c-878f-4aaa-8827-03eed2fe56ae' for key 'PRIMARY'\r\n`\r\n\r\nIt happens rather randomly in time, but in all cases in table  `projections` position counter is less then nr of event which has been created the last read model entry."},"comment":{"url":"https://api.github.com/repos/prooph/proophessor-do-symfony/issues/comments/345723303","html_url":"https://github.com/prooph/proophessor-do-symfony/issues/17#issuecomment-345723303","issue_url":"https://api.github.com/repos/prooph/proophessor-do-symfony/issues/17","id":345723303,"user":{"login":"prolic","id":394428,"avatar_url":"https://avatars0.githubusercontent.com/u/394428?v=4","gravatar_id":"","url":"https://api.github.com/users/prolic","html_url":"https://github.com/prolic","followers_url":"https://api.github.com/users/prolic/followers","following_url":"https://api.github.com/users/prolic/following{/other_user}","gists_url":"https://api.github.com/users/prolic/gists{/gist_id}","starred_url":"https://api.github.com/users/prolic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prolic/subscriptions","organizations_url":"https://api.github.com/users/prolic/orgs","repos_url":"https://api.github.com/users/prolic/repos","events_url":"https://api.github.com/users/prolic/events{/privacy}","received_events_url":"https://api.github.com/users/prolic/received_events","type":"User","site_admin":false},"created_at":"2017-11-20T15:07:47Z","updated_at":"2017-11-20T15:07:47Z","author_association":"OWNER","body":"@Adapik The fix looks good to me. Wanna provide a PR and add a test-case?"}}
{"actor":{"display_login":"prolic"}}