-
Notifications
You must be signed in to change notification settings - Fork 721
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
namespace: support set namespace for meta #834
Conversation
c.Assert(tableClassifier.AddMetaToNamespace("test1"), IsNil) | ||
// Can't be set again. | ||
c.Assert(tableClassifier.AddMetaToNamespace("test1"), NotNil) | ||
c.Assert(tableClassifier.AddMetaToNamespace("test2"), NotNil) |
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.
why we just allow one namespace to add meta?
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.
Same behavior as tables, a table or meta is only allow to bind to a namespace.
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.
LGTM
return namespace.DefaultNamespace | ||
} | ||
|
||
for name, ns := range c.nsInfo.namespaces { | ||
_, ok := ns.TableIDs[tableID] | ||
if ok { | ||
if ok || (isMeta && ns.Meta) { | ||
return name |
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.
any test to cover meta here?
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.
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.
LGTM
Fix #824