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

*: fix table namespace classifier. #808

Merged
merged 6 commits into from Oct 20, 2017

Conversation

Projects
None yet
4 participants
@disksing
Member

disksing commented Oct 19, 2017

  1. GetAllNamespaces should contain DefaultNamespace, or the stores in default namespace will not be balanced.
  2. _ IsPureTableID_ need decode the key before check if it is table prefix.

disksing added some commits Oct 18, 2017

@disksing disksing requested review from dantin and nolouch Oct 19, 2017

Show outdated Hide outdated table/codec.go
@@ -82,9 +82,13 @@ func decodeCmpUintToInt(u uint64) int64 {
return int64(u ^ signMask)
}
// IsPureTableID return true iff b is consist of tablePrefix and 8-byte tableID
// IsPureTableID returns true if b is consist of tablePrefix and 8-byte tableID
func IsPureTableID(b []byte) bool {

This comment has been minimized.

@siddontang

siddontang Oct 19, 2017

Member

please add test

@siddontang

siddontang Oct 19, 2017

Member

please add test

@@ -123,6 +123,7 @@ func (c *tableNamespaceClassifier) GetAllNamespaces() []string {
for name := range c.nsInfo.namespaces {
nsList = append(nsList, name)
}
nsList = append(nsList, namespace.DefaultNamespace)

This comment has been minimized.

@siddontang

siddontang Oct 19, 2017

Member

need to check duplicated default here?

@siddontang

siddontang Oct 19, 2017

Member

need to check duplicated default here?

This comment has been minimized.

@disksing

disksing Oct 19, 2017

Member

Maybe forbid creating namespace using global instead.

@disksing

disksing Oct 19, 2017

Member

Maybe forbid creating namespace using global instead.

disksing and others added some commits Oct 19, 2017

@nolouch nolouch referenced this pull request Oct 19, 2017

Closed

fix isPureTableID bug #809

@siddontang

This comment has been minimized.

Show comment
Hide comment
@siddontang

siddontang Oct 19, 2017

Member

LGTM

Member

siddontang commented Oct 19, 2017

LGTM

@nolouch nolouch merged commit f5f0b20 into pingcap:master Oct 20, 2017

4 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci-pd/build Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@disksing disksing deleted the disksing:namespace branch Oct 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment