-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
*: remove DirtyDB
and DirtyTable
to reduce memory usage
#19042
Changes from all commits
e63dab5
bf83d68
c5727b8
69f49f9
e19f64e
64d114b
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 |
---|---|---|
|
@@ -333,6 +333,31 @@ func (s *testSuite7) TestForUpdateUntouchedIndex(c *C) { | |
tk.MustExec("admin check table t") | ||
} | ||
|
||
func (s *testSuite7) TestUpdateScanningHandles(c *C) { | ||
tk := testkit.NewTestKit(c, s.store) | ||
tk.MustExec("use test") | ||
tk.MustExec("drop table if exists t;") | ||
tk.MustExec("create table t(a int primary key, b int);") | ||
tk.MustExec("begin") | ||
for i := 2; i < 100000; i++ { | ||
tk.MustExec("insert into t values (?, ?)", i, i) | ||
} | ||
tk.MustExec("commit;") | ||
|
||
tk.MustExec("set tidb_distsql_scan_concurrency = 1;") | ||
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. Why set those concurrency variables? 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. To slow down the execution, otherwise, the concurrent scanner cannot scan the updated rows. This SQL is a special case, tries to update |
||
tk.MustExec("set tidb_index_lookup_join_concurrency = 1;") | ||
tk.MustExec("set tidb_projection_concurrency=1;") | ||
tk.MustExec("set tidb_init_chunk_size=1;") | ||
tk.MustExec("set tidb_max_chunk_size=32;") | ||
|
||
tk.MustExec("begin") | ||
tk.MustExec("insert into t values (1, 1);") | ||
tk.MustExec("update /*+ INL_JOIN(t1) */ t t1, (select a, b from t) t2 set t1.b = t2.b where t1.a = t2.a + 1000;") | ||
result := tk.MustQuery("select a, a-b from t where a > 1000 and a - b != 1000;") | ||
c.Assert(result.Rows(), HasLen, 0) | ||
tk.MustExec("rollback;") | ||
} | ||
|
||
// See https://github.com/pingcap/tidb/issues/19136 | ||
func (s *testSuite7) TestForApplyAndUnionScan(c *C) { | ||
tk := testkit.NewTestKit(c, s.store) | ||
|
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.
This is a bench test? so much data may slow the CI.
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.
A correctness test. If the snapshot getter reads the newly added key, the result of this SQL will not empty. The first prototype of this PR doesn't implement snapshot getter, and it fails to pass this test.