Skip to content

Commit

Permalink
planner: remove useless todo comment and fix some typos for index mer…
Browse files Browse the repository at this point in the history
…ge (#46934)
  • Loading branch information
AilinKid authored Sep 13, 2023
1 parent b2ebb3d commit c7f5781
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions executor/index_merge_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ type partialTableWorker struct {
pushedLimit *plannercore.PushedDownLimit
}

// needPartitionHandle indicates whether we need create a partitonHandle or not.
// needPartitionHandle indicates whether we need create a partitionHandle or not.
// If the schema from planner part contains ExtraPhysTblID,
// we need create a partitionHandle, otherwise create a normal handle.
// In TableRowIDScan, the partitionHandle will be used to create key ranges.
Expand Down Expand Up @@ -1504,7 +1504,7 @@ func syncErr(ctx context.Context, finished <-chan struct{}, errCh chan<- *indexM
}
}

// needPartitionHandle indicates whether we need create a partitonHandle or not.
// needPartitionHandle indicates whether we need create a partitionHandle or not.
// If the schema from planner part contains ExtraPidColID or ExtraPhysTblID,
// we need create a partitionHandle, otherwise create a normal handle.
// In TableRowIDScan, the partitionHandle will be used to create key ranges.
Expand Down Expand Up @@ -1692,7 +1692,7 @@ func (w *indexMergeTableScanWorker) pickAndExecTask(ctx context.Context, task **
}
}
// Make sure panic failpoint is after fetch task from workCh.
// Otherwise cannot send error to task.doneCh.
// Otherwise, cannot send error to task.doneCh.
failpoint.Inject("testIndexMergePanicTableScanWorker", nil)
execStart := time.Now()
err := w.executeTask(ctx, *task)
Expand Down
4 changes: 1 addition & 3 deletions executor/test/indexmergereadtest/index_merge_reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,6 @@ func TestPessimisticLockOnPartitionForIndexMerge(t *testing.T) {
require.Equal(t, <-ch, int32(1))
require.Equal(t, <-ch, int32(0))
<-ch // wait for goroutine to quit.

// TODO: add support for index merge reader in dynamic tidb_partition_prune_mode
}

func TestIndexMergeIntersectionConcurrency(t *testing.T) {
Expand Down Expand Up @@ -736,7 +734,7 @@ func TestIntersectionWithDifferentConcurrency(t *testing.T) {
tk.MustQuery(fmt.Sprintf("select /*+ use_index_merge(t1, primary, c2, c3) */ c1 from t1 where c2 < 1024 and c3 > %d", c3)).Sort().Check(res)
}

// In tranaction
// In transaction
for i := 0; i < queryCnt; i++ {
tk.MustExec("begin;")
r := rand.Intn(3)
Expand Down

0 comments on commit c7f5781

Please sign in to comment.