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

ddl: Remove reorgTableDeleteLimit #4898

Merged
merged 4 commits into from Oct 26, 2017
Jump to file or symbol
Failed to load files and symbols.
+2 −10
Diff settings

Always

Just for now

View
@@ -150,9 +150,6 @@ func (d *ddl) splitTableRegion(tableID int64) error {
return nil
}
// Maximum number of keys to delete for each reorg table job run.
var reorgTableDeleteLimit = 65536
func (d *ddl) getTable(schemaID int64, tblInfo *model.TableInfo) (table.Table, error) {
if tblInfo.OldSchemaID != 0 {
schemaID = tblInfo.OldSchemaID
View
@@ -191,17 +191,12 @@ func (s *testTableSuite) SetUpSuite(c *C) {
s.dbInfo = testSchemaInfo(c, s.d, "test")
testCreateSchema(c, testNewContext(s.d), s.d, s.dbInfo)
// Use a smaller limit to prevent the test from consuming too much time.
reorgTableDeleteLimit = 2000
}
func (s *testTableSuite) TearDownSuite(c *C) {
testDropSchema(c, testNewContext(s.d), s.d, s.dbInfo)
s.d.Stop()
s.store.Close()
reorgTableDeleteLimit = 65536
}
func (s *testTableSuite) TestTable(c *C) {
@@ -219,9 +214,9 @@ func (s *testTableSuite) TestTable(c *C) {
newTblInfo := testTableInfo(c, d, "t", 3)
doDDLJobErr(c, s.dbInfo.ID, newTblInfo.ID, model.ActionCreateTable, []interface{}{newTblInfo}, ctx, d)
// To drop a table with reorgTableDeleteLimit+10 records.
count := 2000
tbl := testGetTable(c, d, s.dbInfo.ID, tblInfo.ID)
for i := 1; i <= reorgTableDeleteLimit+10; i++ {
for i := 1; i <= count; i++ {
_, err := tbl.AddRecord(ctx, types.MakeDatums(i, i, i))
c.Assert(err, IsNil)
}
ProTip! Use n and p to navigate between commits in a pull request.