8000 storage: check for additional split work after a split by petermattis · Pull Request #10232 · cockroachdb/cockroach · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

storage: check for additional split work after a split #10232

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

Conversation

petermattis
Copy link
Collaborator
@petermattis petermattis commented Oct 26, 2016

After splitting a range, further split work might be required if the
zone config changed or a table was created concurrently or if the range
was much larger than the target size.

Before this change, TestSplitAtTableBoundary had a wide variance in how
long it would take. Sometimes it would completely in less than a second
while other times it would take 10-20 seconds. With this change it
reliably completes in less than a second.

Fixes #10160


This change is Reviewable

8000

@BramGruneir
Copy link
Member

:lgtm:


Reviewed 2 of 2 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks pending.


Comments from Reviewable

@tamird
Copy link
Contributor
tamird commented Oct 26, 2016

:lgtm:


Reviewed 2 of 2 files at r1.
Review status: all files reviewed at latest revision, 3 unresolved discussions, all commit checks successful.


pkg/sql/table_split_test.go, line 43 at r1 (raw file):

  defer tc.Stopper().Stop()
  if err := tc.WaitForFullReplication(); err != nil {
      t.Error(err)

should be Fatal


pkg/sql/table_split_test.go, line 47 at r1 (raw file):

  sqlDB := sqlutils.MakeSQLRunner(t, tc.Conns[0])
  _ = sqlDB.Exec(`CREATE DATABASE test`)

should check these errors.


pkg/sql/table_split_test.go, line 50 at r1 (raw file):

  _ = sqlDB.Exec(`CREATE TABLE test.t (k SERIAL PRIMARY KEY, v INT)`)

  tableIDQuery := `

optional: const


Comments from Reviewable

After splitting a range, further split work might be required if the
zone config changed or a table was created concurrently or if the range
was much larger than the target size.

Before this change, TestSplitAtTableBoundary had a wide variance in how
long it would take. Sometimes it would completely in less than a second
while other times it would take 10-20 seconds. With this change it
reliably completes in less than a second.

Fixes cockroachdb#10160
@petermattis
Copy link
Collaborator Author

Review status: all files reviewed at latest revision, 3 unresolved discussions, all commit checks successful.


pkg/sql/table_split_test.go, line 43 at r1 (raw file):

Previously, tamird (Tamir Duberstein) wrote…

should be Fatal

Done.

pkg/sql/table_split_test.go, line 47 at r1 (raw file):

Previously, tamird (Tamir Duberstein) wrote…

should check these errors.

Renamed `sqlDB` to `runner` to make this clear that this isn't a `database/sql.DB`. Also removed the assignment to `_` which wasn't necessary.

pkg/sql/table_split_test.go, line 50 at r1 (raw file):

Previously, tamird (Tamir Duberstein) wrote…

optional: const

Done.

Comments from Reviewable

@petermattis petermattis force-pushed the pmattis/test-split-at-table-boundary branch from c622a42 to 7750433 Compare October 26, 2016 16:12
@petermattis petermattis merged commit 5e14c66 into cockroachdb:master Oct 26, 2016
@petermattis petermattis deleted the pmattis/test-split-at-table-boundary branch October 26, 2016 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0