influxdb/v1/coordinator
Ayan George ca2055c16c
refactor: Replace ctx.Done() with ctx.Err() (#19546)
* refactor: Replace ctx.Done() with ctx.Err()

Prior to this commit we checked for context cancellation with a select
block and context.Context.Done() without multiplexing over any other
channel like:

  select {
    case <-ctx.Done():
      // handle cancellation
    default:
      // fallthrough
  }

This commit replaces those type of blocks with a simple check of
ctx.Err().  This has the following benefits:

* Calling ctx.Err() is much faster than entering a select block.

* ctx.Done() allocates a channel when called for the first time.

* Testing the result of ctx.Err() is a reliable way of determininging if
  a context.Context value has been canceled.

* fix: Fix data race in execDeleteTagValueEntry()
2020-09-16 12:20:09 -04:00
..
config.go feat(influxql): Initial implementation of InfluxQL query engine 2020-08-14 12:37:30 -07:00
config_test.go chore(tsdb): Initial commit of tsdb package 2020-08-03 09:17:23 -07:00
meta_client.go chore(tsdb): Initial commit of tsdb package 2020-08-03 09:17:23 -07:00
meta_client_test.go chore(tsdb): Initial commit of tsdb package 2020-08-03 09:17:23 -07:00
points_writer.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
points_writer_internal_test.go chore(tsdb): Initial commit of tsdb package 2020-08-03 09:17:23 -07:00
points_writer_test.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
shard_mapper.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
shard_mapper_test.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
statement_executor.go refactor: Replace ctx.Done() with ctx.Err() (#19546) 2020-09-16 12:20:09 -04:00
statement_executor_test.go chore: Consolidate `v1/internal` to `internal` 2020-09-11 11:37:43 -07:00