-
Notifications
You must be signed in to change notification settings - Fork 227
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
Allow setting concurrency for pipelined flush and resolveLocks #1494
Changes from 8 commits
4618da4
8de9ca0
222c260
58f362c
ea83c82
d3adfc2
6b75b34
219b561
bffb598
64bc7bd
27d6eb5
731a393
39ee688
e2ef7da
4af7b8b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module gcworker | ||
|
||
go 1.23 | ||
go 1.23.2 | ||
|
||
require github.com/tikv/client-go/v2 v2.0.0 | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module rawkv | ||
|
||
go 1.23 | ||
go 1.23.2 | ||
|
||
require github.com/tikv/client-go/v2 v2.0.0 | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module 1pc_txn | ||
|
||
go 1.23 | ||
go 1.23.2 | ||
|
||
require github.com/tikv/client-go/v2 v2.0.0 | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module async_commit | ||
|
||
go 1.23 | ||
go 1.23.2 | ||
|
||
require github.com/tikv/client-go/v2 v2.0.0 | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module delete_range | ||
|
||
go 1.23 | ||
go 1.23.2 | ||
|
||
require github.com/tikv/client-go/v2 v2.0.0 | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module txnkv | ||
|
||
go 1.23 | ||
go 1.23.2 | ||
|
||
require github.com/tikv/client-go/v2 v2.0.0 | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module pessimistic_txn | ||
|
||
go 1.23 | ||
go 1.23.2 | ||
|
||
require github.com/tikv/client-go/v2 v2.0.0 | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module unsafedestoryrange | ||
|
||
go 1.23 | ||
go 1.23.2 | ||
|
||
require github.com/tikv/client-go/v2 v2.0.0 | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -454,7 +454,6 @@ func (c *twoPhaseCommitter) buildPipelinedResolveHandler(commit bool, resolved * | |
// resolveFlushedLocks resolves all locks in the given range [start, end) with the given status. | ||
// The resolve process is running in another goroutine so this function won't block. | ||
func (c *twoPhaseCommitter) resolveFlushedLocks(bo *retry.Backoffer, start, end []byte, commit bool) { | ||
const RESOLVE_CONCURRENCY = 8 | ||
var resolved atomic.Uint64 | ||
handler, err := c.buildPipelinedResolveHandler(commit, &resolved) | ||
commitTs := uint64(0) | ||
|
@@ -481,7 +480,7 @@ func (c *twoPhaseCommitter) resolveFlushedLocks(bo *retry.Backoffer, start, end | |
fmt.Sprintf("pipelined-dml-%s", status), | ||
fmt.Sprintf("pipelined-dml-%s-%d", status, c.startTS), | ||
c.store, | ||
RESOLVE_CONCURRENCY, | ||
c.txn.pipelinedResolveLockConcurrency, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The throttle flow control works when flushing. And the resolve-lock phase can also consume many resources, and it may also needs to be controlled by throttle, what about adding a TODO here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Throttling the resolve lock goroutine is in our current plan I think. For now we rely on the concurrency to constrain it. If we want a better control of its resource usage we might need to consider a more comprehensive mechanism, e.g. one that helps reduce the overhead of resolving locks of multiple p-txns running in parallel. |
||
handler, | ||
) | ||
runner.SetStatLogInterval(30 * time.Second) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it an auto update from IDE? I think
go1.23
is enough.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forget the reason to do so, probably because of compiling or CI stuff. I will revert it