{"action":"created","issue":{"url":"https://api.github.com/repos/hazelcast/hazelcast/issues/4564","labels_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/4564/labels{/name}","comments_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/4564/comments","events_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/4564/events","html_url":"https://github.com/hazelcast/hazelcast/pull/4564","id":57074320,"number":4564,"title":"Exceptional behavior + Operation.returnsResponse changed","user":{"login":"pveentjer","id":105243,"avatar_url":"https://avatars.githubusercontent.com/u/105243?v=3","gravatar_id":"","url":"https://api.github.com/users/pveentjer","html_url":"https://github.com/pveentjer","followers_url":"https://api.github.com/users/pveentjer/followers","following_url":"https://api.github.com/users/pveentjer/following{/other_user}","gists_url":"https://api.github.com/users/pveentjer/gists{/gist_id}","starred_url":"https://api.github.com/users/pveentjer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pveentjer/subscriptions","organizations_url":"https://api.github.com/users/pveentjer/orgs","repos_url":"https://api.github.com/users/pveentjer/repos","events_url":"https://api.github.com/users/pveentjer/events{/privacy}","received_events_url":"https://api.github.com/users/pveentjer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hazelcast/hazelcast/labels/Team:%20Core","name":"Team: Core","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/hazelcast/hazelcast/milestones/55","html_url":"https://github.com/hazelcast/hazelcast/milestones/3.5","labels_url":"https://api.github.com/repos/hazelcast/hazelcast/milestones/55/labels","id":819785,"number":55,"title":"3.5","description":null,"creator":{"login":"sancar","id":570462,"avatar_url":"https://avatars.githubusercontent.com/u/570462?v=3","gravatar_id":"","url":"https://api.github.com/users/sancar","html_url":"https://github.com/sancar","followers_url":"https://api.github.com/users/sancar/followers","following_url":"https://api.github.com/users/sancar/following{/other_user}","gists_url":"https://api.github.com/users/sancar/gists{/gist_id}","starred_url":"https://api.github.com/users/sancar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sancar/subscriptions","organizations_url":"https://api.github.com/users/sancar/orgs","repos_url":"https://api.github.com/users/sancar/repos","events_url":"https://api.github.com/users/sancar/events{/privacy}","received_events_url":"https://api.github.com/users/sancar/received_events","type":"User","site_admin":false},"open_issues":97,"closed_issues":221,"state":"open","created_at":"2014-10-09T13:04:53Z","updated_at":"2015-03-09T22:03:11Z","due_on":null,"closed_at":null},"comments":12,"created_at":"2015-02-09T19:03:52Z","updated_at":"2015-03-10T03:16:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/4564","html_url":"https://github.com/hazelcast/hazelcast/pull/4564","diff_url":"https://github.com/hazelcast/hazelcast/pull/4564.diff","patch_url":"https://github.com/hazelcast/hazelcast/pull/4564.patch"},"body":"When an operation.returnsResponse returns false, it doesn't always mean that is doesn't return a response.. Only that it doesn't want a response when executing from an operation-thread. For example the IExecutor BaseCallableTaskOperation will not immediately return a response, only when the task that is executed is completed so the future.get can complete. This could be minutes after the BaseCallableTaskOperation completed (the only thing it did is to move to task into the TPE).\r\n\r\nBut.. if an exception is thrown:\r\n- perhaps in the run methods when moving the task to the TPE\r\n- verification errors: perhaps the partition has moved to a different machine\r\n\r\nThen the exceptions are not send to the Invocation and therefore the Invocation can't handle it; e.g. resend the operation to the correct partition or propagate the exception to the user.\r\n\r\nThis pr changes the behaviour that a response is always send to the response handler no matter if operation.returnsResponse returns false. There is no change for operations that don't have an invocation, have callid==0 and therefor will have a empty-responsehandler; so the response is send to the empty response-handler.\r\n\r\nWhat also is changed is that when a response is received and no invocation is found, no exception is thrown but just a log under warn is made. The thread dealing with this exception is the response handler and he can't do anything about the exception anyway.\r\n\r\nI also added a test to verify the behaviour +  did some testing cleanup."},"comment":{"url":"https://api.github.com/repos/hazelcast/hazelcast/issues/comments/77988870","html_url":"https://github.com/hazelcast/hazelcast/pull/4564#issuecomment-77988870","issue_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/4564","id":77988870,"user":{"login":"pveentjer","id":105243,"avatar_url":"https://avatars.githubusercontent.com/u/105243?v=3","gravatar_id":"","url":"https://api.github.com/users/pveentjer","html_url":"https://github.com/pveentjer","followers_url":"https://api.github.com/users/pveentjer/followers","following_url":"https://api.github.com/users/pveentjer/following{/other_user}","gists_url":"https://api.github.com/users/pveentjer/gists{/gist_id}","starred_url":"https://api.github.com/users/pveentjer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pveentjer/subscriptions","organizations_url":"https://api.github.com/users/pveentjer/orgs","repos_url":"https://api.github.com/users/pveentjer/repos","events_url":"https://api.github.com/users/pveentjer/events{/privacy}","received_events_url":"https://api.github.com/users/pveentjer/received_events","type":"User","site_admin":false},"created_at":"2015-03-10T03:16:05Z","updated_at":"2015-03-10T03:16:05Z","body":"I think I understand the issue. In this case the BackupOperation is throwing an exception and since we modified the exception returning behavior to always return a result in case of an exception, the invocation gets an exception-response from the backup instead of the normal BackupResponse."}}