Commit Graph

11 Commits (2bc9e1075786024587bde6fc10d9f188b898dfa9)

Author SHA1 Message Date
Edd Robinson de0e9b1a4b Unify approach to short-circuit auth 2018-01-17 14:00:24 +00:00
Jonathan A. Sternberg ecba19eb27 Prevent a panic when a query simultaneously finishes and is killed at the same time
There is a strange race condition where a query can be killed and finish
at approximately the same time. If this happens, the query gets
retrieved by the killing task, the query gets closed by the normal
processing thread, and then the killing task attempts to kill the query
afterwards. Since the close doesn't mark the query as already killed
(since it's not killed, just merely unused), the killing thread attempts
to close the channel again.

Mark the query as killed whenever it is closed to prevent a double close
from happening. This should never cause the status to be erroneously
reported since the query status is removed from the query table within
the same lock scope.
2018-01-02 11:04:01 -06:00
Edd Robinson c098081c7d Don't initialise a new Authorizer each query 2017-11-17 11:06:43 +00:00
Jonathan A. Sternberg 0b7c56bcd8 Update the zap logger dependency
The previous sha was taken from a revision on a devel branch that I
thought would continue staying in the tree after it was merged. That
revision was rebased away and the API was changed for the logger.

This updates the usage of the logger and adds a simple package for
constructing the base logger.

The 1.0 version of zap changed the format of the default console logger
so this change moves over to this new logger instead of attempting to
retain backwards compatibility with the old format.
2017-11-10 16:27:16 -06:00
Stuart Carnie f3d45ba301 influxdata/influxdb/influxql -> influxdata/influxql 2017-10-30 14:40:26 -07:00
Stuart Carnie 7435725e05 move RewriteStatement and neldermead to influxdb/query package 2017-10-30 10:24:15 -07:00
Jonathan A. Sternberg 11c62eb9ab Merge pull request #9020 from influxdata/js-9018-panic-on-task-manager-close
Do not panic when the task manager closes if a killed query is still running
2017-10-26 12:10:57 -05:00
Jonathan A. Sternberg 764e4e501c Do not panic when the task manager closes if a killed query is still running
This prevents a channel from being closed twice when the task manager is
closed. That same check existed to make sure a panic didn't happen when
detaching a killed query, but the check was forgotten when closing the
task manager.

This also adds a new error when attempting to kill an already killed
query.
2017-10-26 11:31:18 -05:00
Stuart Carnie c51ba16287 fixes #9007 2017-10-25 13:08:55 -07:00
Jonathan A. Sternberg 107feebb81 Report the task status for a query
This more accurately shows whether or not a query has been killed.
Instead of automatically removing it from the query table when it's
killed even though goroutines and iterators may still be open, it now
marks the process as killed. This should allow us to more accurately
determine if a query has been stalled and is still using resources on
the server.

This is related to #8848, but not directly connected.
2017-09-19 14:48:56 -05:00
Jonathan A. Sternberg 9a2357c2c0 Separate the query engine into a separate package
This change provides a clear separation between the query engine
mechanics and the query language so that the language can be parsed and
dealt with separate from the query engine itself.
2017-08-16 13:38:43 -05:00