influxdb/tsdb/index/tsi1
Ayan George ca2055c16c
refactor: Replace ctx.Done() with ctx.Err() ()
* 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
..
testdata chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
cache.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
cache_test.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
doc.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
file_set.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
file_set_test.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
index.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
index_file.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
index_file_test.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
index_files.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
index_files_test.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
index_test.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
log_file.go refactor: Replace ctx.Done() with ctx.Err() () 2020-09-16 12:20:09 -04:00
log_file_test.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
measurement_block.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
measurement_block_test.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
partition.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
partition_test.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
sql_index_exporter.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
sql_index_exporter_test.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
tag_block.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
tag_block_test.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
tsi1.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
tsi1_test.go chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00