{"action":"opened","issue":{"url":"https://api.github.com/repos/msemys/esjc/issues/10","repository_url":"https://api.github.com/repos/msemys/esjc","labels_url":"https://api.github.com/repos/msemys/esjc/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/msemys/esjc/issues/10/comments","events_url":"https://api.github.com/repos/msemys/esjc/issues/10/events","html_url":"https://github.com/msemys/esjc/issues/10","id":183080605,"number":10,"title":"CatchUpSubscription dropData not cleared on reconnect.","user":{"login":"jezovuk","id":1548456,"avatar_url":"https://avatars.githubusercontent.com/u/1548456?v=3","gravatar_id":"","url":"https://api.github.com/users/jezovuk","html_url":"https://github.com/jezovuk","followers_url":"https://api.github.com/users/jezovuk/followers","following_url":"https://api.github.com/users/jezovuk/following{/other_user}","gists_url":"https://api.github.com/users/jezovuk/gists{/gist_id}","starred_url":"https://api.github.com/users/jezovuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jezovuk/subscriptions","organizations_url":"https://api.github.com/users/jezovuk/orgs","repos_url":"https://api.github.com/users/jezovuk/repos","events_url":"https://api.github.com/users/jezovuk/events{/privacy}","received_events_url":"https://api.github.com/users/jezovuk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-14T15:31:09Z","updated_at":"2016-10-14T15:31:09Z","closed_at":null,"body":"Hi Mindaugas,\r\n\r\nConsider the following scenario:\r\n1) EventStore server is started.\r\n2) Client application with catch-up subscription is started, with unlimited client reconnections and unlimited operation retries.\r\n3) Catch-up phase completes, live processing is started.\r\n4) EventStore server goes down.\r\n5) TCP connection drop is detected, volatile subscription is closed, catch-uo drop is enqueued (in response to volatile subscription calling onClose() on VolatileSubscriptionListener registered to it in CatchUpSubscription.runSubscription()). CatchUpSubscription.dropData is set (in enqueueSubscriptionDropNotification()).\r\n6) Drop event is processed in CatchUpSubscription.processLiveQueue(), dropData remains set.\r\n7) EventStore server goes up again.\r\n8) Client detects server restart and reconnects.\r\n9) CatchUpSubscription.reconnectionHook is invoked, restarting catch-up subscription.\r\n10) CatchUpSubscription.runSubscription() clears/resets stopped, allowProcessing and isDropped, but not dropData.\r\n11) Regular catch-up unsubscribe is no longer possible, since drop events will not get enqueued anymore.\r\n\r\nThe straightforward solution is to simply reset dropData in runSubscription() along with other markers. Of course, it is possible that we're missing something and that the solution should be more involved. We would be grateful for any feedback (or fix if possible).\r\n\r\nBest regards,\r\nMarko & Đorđe\r\n"}}
{"actor":{"display_login":"jezovuk"}}