{"action":"created","issue":{"url":"https://api.github.com/repos/macdice/syncreplay-spring-demo/issues/2","repository_url":"https://api.github.com/repos/macdice/syncreplay-spring-demo","labels_url":"https://api.github.com/repos/macdice/syncreplay-spring-demo/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/macdice/syncreplay-spring-demo/issues/2/comments","events_url":"https://api.github.com/repos/macdice/syncreplay-spring-demo/issues/2/events","html_url":"https://github.com/macdice/syncreplay-spring-demo/pull/2","id":243222935,"number":2,"title":"refactor isBlackListed logic in ReadDataSource","user":{"login":"arnaudroger","id":6161581,"avatar_url":"https://avatars4.githubusercontent.com/u/6161581?v=4","gravatar_id":"","url":"https://api.github.com/users/arnaudroger","html_url":"https://github.com/arnaudroger","followers_url":"https://api.github.com/users/arnaudroger/followers","following_url":"https://api.github.com/users/arnaudroger/following{/other_user}","gists_url":"https://api.github.com/users/arnaudroger/gists{/gist_id}","starred_url":"https://api.github.com/users/arnaudroger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arnaudroger/subscriptions","organizations_url":"https://api.github.com/users/arnaudroger/orgs","repos_url":"https://api.github.com/users/arnaudroger/repos","events_url":"https://api.github.com/users/arnaudroger/events{/privacy}","received_events_url":"https://api.github.com/users/arnaudroger/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-16T07:25:16Z","updated_at":"2017-07-16T10:25:16Z","closed_at":"2017-07-16T09:03:39Z","pull_request":{"url":"https://api.github.com/repos/macdice/syncreplay-spring-demo/pulls/2","html_url":"https://github.com/macdice/syncreplay-spring-demo/pull/2","diff_url":"https://github.com/macdice/syncreplay-spring-demo/pull/2.diff","patch_url":"https://github.com/macdice/syncreplay-spring-demo/pull/2.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/macdice/syncreplay-spring-demo/issues/comments/315599858","html_url":"https://github.com/macdice/syncreplay-spring-demo/pull/2#issuecomment-315599858","issue_url":"https://api.github.com/repos/macdice/syncreplay-spring-demo/issues/2","id":315599858,"user":{"login":"arnaudroger","id":6161581,"avatar_url":"https://avatars4.githubusercontent.com/u/6161581?v=4","gravatar_id":"","url":"https://api.github.com/users/arnaudroger","html_url":"https://github.com/arnaudroger","followers_url":"https://api.github.com/users/arnaudroger/followers","following_url":"https://api.github.com/users/arnaudroger/following{/other_user}","gists_url":"https://api.github.com/users/arnaudroger/gists{/gist_id}","starred_url":"https://api.github.com/users/arnaudroger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arnaudroger/subscriptions","organizations_url":"https://api.github.com/users/arnaudroger/orgs","repos_url":"https://api.github.com/users/arnaudroger/repos","events_url":"https://api.github.com/users/arnaudroger/events{/privacy}","received_events_url":"https://api.github.com/users/arnaudroger/received_events","type":"User","site_admin":false},"created_at":"2017-07-16T10:25:15Z","updated_at":"2017-07-16T10:25:15Z","body":"That's what happen when you do it between serving breakfast to the children...\n\nSent from my iPhone\n\n> On 16 Jul 2017, at 10:31, Thomas Munro <notifications@github.com> wrote:\n> \n> @macdice commented on this pull request.\n> \n> In src/main/java/demo/ReadBalancingDataSource.java:\n> \n> > -                return true;\n> -            }\n> -            return false ;\n> +        public boolean isBlacklisted() {\n> +            long currentBlacklistedUntil;\n> +            do {\n> +                currentBlacklistedUntil = this.blacklistedUntil.get();\n> +\n> +                if (currentBlacklistedUntil == -1) {\n> +                    return false;\n> +                }\n> +\n> +                if (currentBlacklistedUntil < blacklistClockTime()) {\n> +                    return true;\n> +                }\n> +            } while (blacklistedUntil.compareAndSet(currentBlacklistedUntil, -1)); // CAS loop\n> Shouldn't this have \"!\" in front of it? We'd only want to go around again if the CAS test fails (meaning someone else moved it).\n> \n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub, or mute the thread.\n> \n"}}
{"actor":{"display_login":"arnaudroger"}}