{"action":"created","issue":{"url":"https://api.github.com/repos/Netflix/Hystrix/issues/1383","repository_url":"https://api.github.com/repos/Netflix/Hystrix","labels_url":"https://api.github.com/repos/Netflix/Hystrix/issues/1383/labels{/name}","comments_url":"https://api.github.com/repos/Netflix/Hystrix/issues/1383/comments","events_url":"https://api.github.com/repos/Netflix/Hystrix/issues/1383/events","html_url":"https://github.com/Netflix/Hystrix/issues/1383","id":183136722,"number":1383,"title":"Does execution.isolation.strategy really default to THREAD as stated in the docs?","user":{"login":"dagronnell","id":8478654,"avatar_url":"https://avatars.githubusercontent.com/u/8478654?v=3","gravatar_id":"","url":"https://api.github.com/users/dagronnell","html_url":"https://github.com/dagronnell","followers_url":"https://api.github.com/users/dagronnell/followers","following_url":"https://api.github.com/users/dagronnell/following{/other_user}","gists_url":"https://api.github.com/users/dagronnell/gists{/gist_id}","starred_url":"https://api.github.com/users/dagronnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dagronnell/subscriptions","organizations_url":"https://api.github.com/users/dagronnell/orgs","repos_url":"https://api.github.com/users/dagronnell/repos","events_url":"https://api.github.com/users/dagronnell/events{/privacy}","received_events_url":"https://api.github.com/users/dagronnell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-14T19:52:38Z","updated_at":"2016-10-14T20:24:48Z","closed_at":null,"body":"Running a test with javanica annotations and it seems like default execution isolation strategy is SEMAPHORE and not THREAD. Is this a bug or error in the docs or did I misunderstand something?\r\n\r\nThe test below will print: \r\n```\r\nCommand thread-id: 1\r\nMain thread-id: 1\r\n```\r\nUncommenting the `@HystrixProperty` will make the test print out different thread-ids.\r\n\r\n```\r\n@Test\r\npublic void name() throws InterruptedException {\r\n    Observable<String> result = annotatedService.hello();\r\n    System.out.println(\"Main thread-id: \"+Thread.currentThread().getId());\r\n    result.subscribe(\r\n            System.out::println,\r\n            Throwable::printStackTrace\r\n    );\r\n    Thread.sleep(5000);\r\n}\r\n\r\npublic class AnnotatedService {\r\n    @HystrixCommand(\r\n            commandProperties = {\r\n//                    @HystrixProperty(name = \"execution.isolation.strategy\", value = \"THREAD\")\r\n            }\r\n    )\r\n    Observable<String> hello() {\r\n        System.out.println(\"Command thread-id: \"+Thread.currentThread().getId());\r\n\r\n        return Observable.create(subscriber -> {\r\n            if (!subscriber.isUnsubscribed()) {\r\n                try {\r\n                    Thread.sleep(5000);\r\n                    subscriber.onNext(\"Hello\");\r\n                    subscriber.onCompleted();\r\n                } catch (InterruptedException e) {\r\n                    throw new RuntimeException(e);\r\n                }\r\n            }\r\n        });\r\n    }\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/Netflix/Hystrix/issues/comments/253910324","html_url":"https://github.com/Netflix/Hystrix/issues/1383#issuecomment-253910324","issue_url":"https://api.github.com/repos/Netflix/Hystrix/issues/1383","id":253910324,"user":{"login":"56quarters","id":1127373,"avatar_url":"https://avatars.githubusercontent.com/u/1127373?v=3","gravatar_id":"","url":"https://api.github.com/users/56quarters","html_url":"https://github.com/56quarters","followers_url":"https://api.github.com/users/56quarters/followers","following_url":"https://api.github.com/users/56quarters/following{/other_user}","gists_url":"https://api.github.com/users/56quarters/gists{/gist_id}","starred_url":"https://api.github.com/users/56quarters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/56quarters/subscriptions","organizations_url":"https://api.github.com/users/56quarters/orgs","repos_url":"https://api.github.com/users/56quarters/repos","events_url":"https://api.github.com/users/56quarters/events{/privacy}","received_events_url":"https://api.github.com/users/56quarters/received_events","type":"User","site_admin":false},"created_at":"2016-10-14T20:24:48Z","updated_at":"2016-10-14T20:24:48Z","body":"FWIW, I noticed the same thing. Seems to only be with methods that return `Observable<T>`. Methods that return `Future<T>` and `T` use threads for isolation by default."}}
{"actor":{"display_login":"56quarters"}}