*: address comments

This commit is contained in:
disksing
2015-12-21 18:56:03 +08:00
parent db377aab21
commit 123bbe0fb0
4 changed files with 5 additions and 5 deletions

View File

@ -146,7 +146,7 @@ func parseDriverDSN(dsn string) (storePath, dbName string, err error) {
// Open returns a new connection to the database.
//
// The dsn must be formatted as an URL 'engine://path/dbname?params'.
// The dsn must be a URL format 'engine://path/dbname?params'.
// Engine is the storage name registered with RegisterStore.
// Path is the storage specific format.
// Params is key-value pairs split by '&', optional params are storage specific.

View File

@ -151,8 +151,8 @@ func (d Driver) Open(path string) (kv.Storage, error) {
if err != nil {
return nil, errors.Trace(err)
}
uuid := fmt.Sprintf("hbase-%v-%v", zks, tableName)
uuid := fmt.Sprintf("hbase-%v-%v", zks, tableName)
if store, ok := mc.cache[uuid]; ok {
if oracleAddr != store.oracleAddr {
return nil, errors.Errorf("store(%s) is opened with a different tso(%v)", uuid, store.oracleAddr)

View File

@ -285,7 +285,7 @@ func IsLocalStore(s kv.Storage) bool {
}
// Open opens or creates a storage with specific format for a local engine Driver.
// The path should be formatted as an URL which is described in tidb package.
// The path should be a URL format which is described in tidb package.
func (d Driver) Open(path string) (kv.Storage, error) {
mc.mu.Lock()
defer mc.mu.Unlock()

View File

@ -297,8 +297,8 @@ func RegisterLocalStore(name string, driver engine.Driver) error {
// NewStore creates a kv Storage with path.
//
// The path must be formatted as an URL 'engine://path?params' like the one for tidb.Open() but
// with the dbname cut off.
// The path must be a URL format 'engine://path?params' like the one for
// tidb.Open() but with the dbname cut off.
// Examples:
// goleveldb://relative/path
// boltdb:///absolute/path