{"action":"created","issue":{"url":"https://api.github.com/repos/ReactiveX/RxJava/issues/2892","labels_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/2892/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/2892/comments","events_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/2892/events","html_url":"https://github.com/ReactiveX/RxJava/pull/2892","id":69418313,"number":2892,"title":"Fix Observable.range race condition","user":{"login":"davidmoten","id":318187,"avatar_url":"https://avatars.githubusercontent.com/u/318187?v=3","gravatar_id":"","url":"https://api.github.com/users/davidmoten","html_url":"https://github.com/davidmoten","followers_url":"https://api.github.com/users/davidmoten/followers","following_url":"https://api.github.com/users/davidmoten/following{/other_user}","gists_url":"https://api.github.com/users/davidmoten/gists{/gist_id}","starred_url":"https://api.github.com/users/davidmoten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidmoten/subscriptions","organizations_url":"https://api.github.com/users/davidmoten/orgs","repos_url":"https://api.github.com/users/davidmoten/repos","events_url":"https://api.github.com/users/davidmoten/events{/privacy}","received_events_url":"https://api.github.com/users/davidmoten/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-19T12:11:04Z","updated_at":"2015-04-20T05:21:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ReactiveX/RxJava/pulls/2892","html_url":"https://github.com/ReactiveX/RxJava/pull/2892","diff_url":"https://github.com/ReactiveX/RxJava/pull/2892.diff","patch_url":"https://github.com/ReactiveX/RxJava/pull/2892.patch"},"body":"In `RangeProducer` if the first two requests come concurrently and are both for `Long.MAX_VALUE` then there is a possible race condition where the fast path is started twice thus emitting some or all elements twice.\r\n\r\nThis PR fixes the race by only allowing the fast path if the current request count is 0 (using ```compareAndSet```)."},"comment":{"url":"https://api.github.com/repos/ReactiveX/RxJava/issues/comments/94359201","html_url":"https://github.com/ReactiveX/RxJava/pull/2892#issuecomment-94359201","issue_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/2892","id":94359201,"user":{"login":"akarnokd","id":1269832,"avatar_url":"https://avatars.githubusercontent.com/u/1269832?v=3","gravatar_id":"","url":"https://api.github.com/users/akarnokd","html_url":"https://github.com/akarnokd","followers_url":"https://api.github.com/users/akarnokd/followers","following_url":"https://api.github.com/users/akarnokd/following{/other_user}","gists_url":"https://api.github.com/users/akarnokd/gists{/gist_id}","starred_url":"https://api.github.com/users/akarnokd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akarnokd/subscriptions","organizations_url":"https://api.github.com/users/akarnokd/orgs","repos_url":"https://api.github.com/users/akarnokd/repos","events_url":"https://api.github.com/users/akarnokd/events{/privacy}","received_events_url":"https://api.github.com/users/akarnokd/received_events","type":"User","site_admin":false},"created_at":"2015-04-20T05:21:16Z","updated_at":"2015-04-20T05:21:16Z","body":"Looks good. Thanks."}}