{"action":"created","issue":{"url":"https://api.github.com/repos/influxdb/influxdb/issues/3522","labels_url":"https://api.github.com/repos/influxdb/influxdb/issues/3522/labels{/name}","comments_url":"https://api.github.com/repos/influxdb/influxdb/issues/3522/comments","events_url":"https://api.github.com/repos/influxdb/influxdb/issues/3522/events","html_url":"https://github.com/influxdb/influxdb/pull/3522","id":98206066,"number":3522,"title":"Consume CQ results on request timeouts","user":{"login":"dim","id":16614,"avatar_url":"https://avatars.githubusercontent.com/u/16614?v=3","gravatar_id":"","url":"https://api.github.com/users/dim","html_url":"https://github.com/dim","followers_url":"https://api.github.com/users/dim/followers","following_url":"https://api.github.com/users/dim/following{/other_user}","gists_url":"https://api.github.com/users/dim/gists{/gist_id}","starred_url":"https://api.github.com/users/dim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dim/subscriptions","organizations_url":"https://api.github.com/users/dim/orgs","repos_url":"https://api.github.com/users/dim/repos","events_url":"https://api.github.com/users/dim/events{/privacy}","received_events_url":"https://api.github.com/users/dim/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-30T16:05:45Z","updated_at":"2015-08-06T16:04:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/influxdb/influxdb/pulls/3522","html_url":"https://github.com/influxdb/influxdb/pull/3522","diff_url":"https://github.com/influxdb/influxdb/pull/3522.diff","patch_url":"https://github.com/influxdb/influxdb/pull/3522.patch"},"body":"As a follow-up to #3517, I have been able to isolate the actual issue. When timeouts occur during the execution of a CQ, the result channel is never consumed, which causes a deadlock in the [query_executor](https://github.com/influxdb/influxdb/blob/a09c0065/tsdb/query_executor.go#L276). Because we are stuck in the [executor](https://github.com/influxdb/influxdb/blob/a09c00653c9fb6bfe8e4a28075ea5bbaa6362568/tsdb/executor.go#L451) the mapper is never closed and the read-only transaction is never released, locking all subsequent writes."},"comment":{"url":"https://api.github.com/repos/influxdb/influxdb/issues/comments/128419565","html_url":"https://github.com/influxdb/influxdb/pull/3522#issuecomment-128419565","issue_url":"https://api.github.com/repos/influxdb/influxdb/issues/3522","id":128419565,"user":{"login":"dim","id":16614,"avatar_url":"https://avatars.githubusercontent.com/u/16614?v=3","gravatar_id":"","url":"https://api.github.com/users/dim","html_url":"https://github.com/dim","followers_url":"https://api.github.com/users/dim/followers","following_url":"https://api.github.com/users/dim/following{/other_user}","gists_url":"https://api.github.com/users/dim/gists{/gist_id}","starred_url":"https://api.github.com/users/dim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dim/subscriptions","organizations_url":"https://api.github.com/users/dim/orgs","repos_url":"https://api.github.com/users/dim/repos","events_url":"https://api.github.com/users/dim/events{/privacy}","received_events_url":"https://api.github.com/users/dim/received_events","type":"User","site_admin":false},"created_at":"2015-08-06T16:04:31Z","updated_at":"2015-08-06T16:04:31Z","body":"I tried to write a test but there are quite a few dependencies, which makes\nit difficult. I have demonstrated the problem in the other ticket.\n\nYes, just closing the channel will cause a panic.\n"}}