-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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: correct comments mistake. #3119
ddl: correct comments mistake. #3119
Conversation
ddl/table_test.go
Outdated
@@ -38,7 +38,7 @@ type testTableSuite struct { | |||
d *ddl | |||
} | |||
|
|||
// create a test table with num int columns and with no index. | |||
// testTableInfo create a test table with num int columns and with no index. |
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.
create -> creates
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.
DONE
ddl/ddl_api.go
Outdated
@@ -684,12 +684,13 @@ func (d *ddl) CreateTable(ctx context.Context, ident ast.Ident, colDefs []*ast.C | |||
return errors.Trace(err) | |||
} | |||
|
|||
// If create table with auto_increment option, we should rebase tableAutoIncID value. | |||
// handleAutoIncID increases AutoIncID by one. Rebase table's AutoIncID value, when table created with auto_increment option |
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.
handleAutoIncID handles auto_increment option in DDL. It creates a ID counter for the table and initiates the counter to a proper value.
For example if the option sets auto_increment to 10. The counter will be set to 9. So the next allocated ID will be 10.
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.
DONE
ddl/ddl_api.go
Outdated
@@ -704,7 +705,7 @@ func (d *ddl) handleAutoIncID(tbInfo *model.TableInfo, schemaID int64) error { | |||
return nil | |||
} | |||
|
|||
// Add create table options into TableInfo. | |||
// handleTableOptions update tableInfo according to table options. |
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.
update -> updates
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.
DONE
ddl/ddl.go
Outdated
@@ -150,14 +150,15 @@ func (e *Event) String() string { | |||
return ret | |||
} | |||
|
|||
// ddl is data definition language which defines basic operation such as create, alter and select. |
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.
select is not DDL, but DML.
ddl represents the statements which are used to define the database structure or schema.
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.
DONE
@zimulala PTAL |
ddl/column.go
Outdated
@@ -265,6 +265,7 @@ func (d *ddl) onDropColumn(t *meta.Meta, job *model.Job) error { | |||
return errors.Trace(err) | |||
} | |||
|
|||
// addTableColumn |
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.
addTableColumn adds a column to the table.
ddl/ddl.go
Outdated
@@ -177,7 +178,7 @@ type ddl struct { | |||
wait sync.WaitGroup | |||
} | |||
|
|||
// BindStatsHandle will bind the stats handle with a DDL interface. It will be called after a handle has been initialized. | |||
// RegisterEventCh registers passed channel for ddl Event |
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.
Add .
at the end of a line.
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.
DONE
ddl/ddl_worker.go
Outdated
// For every lease, we will re-update the whole schema, so we will wait 2 * lease time | ||
// to guarantee that all servers have already updated schema. | ||
// waitSchemaChanged wait for the completion of updating all servers' schemea. In order to make sure that happens, | ||
// we wait 2 * lease time. |
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.
s/wait/waits
ddl/index.go
Outdated
@@ -466,6 +466,8 @@ type indexTaskOpInfo struct { | |||
nextCh chan int64 // It notifies to start the next task. | |||
} | |||
|
|||
// addTableIndex adds index into table. | |||
// TODO move this to doc or wiki |
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.
s/TODO
/TODO:
s/move/Move
Add .
at the end of a line.
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.
DONE
bca9774
to
6f90337
Compare
LGTM |
ddl/ddl_worker.go
Outdated
@@ -409,8 +409,8 @@ func toTError(err error) *terror.Error { | |||
return terror.ClassDDL.New(terror.CodeUnknown, err.Error()) | |||
} | |||
|
|||
// For every lease, we will re-update the whole schema, so we will wait 2 * lease time | |||
// to guarantee that all servers have already updated schema. | |||
// waitSchemaChanged waits for the completion of updating all servers' schemea. In order to make sure that happens, |
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.
s/schemea/schema
6f90337
to
d0a0c01
Compare
d0a0c01
to
0f211a3
Compare
@XuHuaiyu PTAL |
LGTM |
No description provided.