Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tikv: fix infinitely rebirthed secondary keys commit retry goroutine during tikv error #16061

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
address comments
  • Loading branch information
lysu committed Apr 9, 2020
commit 6ac993c26a137e4e4b6de0cc76522775d37a0c48
17 changes: 1 addition & 16 deletions store/tikv/2pc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"math"
"math/rand"
"reflect"
"runtime"
"strings"
"sync"
"sync/atomic"
Expand Down Expand Up @@ -537,21 +536,7 @@ func (s *testCommitterSuite) TestCommitRetryLimit(c *C) {
c.Assert(committer.commitMutations(NewBackoffer(ctx, CommitMaxBackoff), committer.mutations), IsNil)

// wait secondary keys goroutines(include retry guys) done.
ticker := time.NewTicker(1 * time.Second)
defer ticker.Stop()
doneCh := make(chan struct{})
go func() {
committer.testingKnobs.secondaryCommitDoneWg.Wait()
close(doneCh)
}()
for {
select {
case <-ticker.C:
fmt.Println(runtime.NumGoroutine())
case <-doneCh:
return
}
}
committer.testingKnobs.secondaryCommitDoneWg.Wait()
}

func (s *testCommitterSuite) TestRejectCommitTS(c *C) {
Expand Down