GitHub user iilyak opened a pull request:
https://github.com/apache/couchdb-couch/pull/160
Change normalize_dbname semantic add dbname_suffix
normalize_dbname used to return last componenent of the shard path. But
it was doing so only if argument was passed as a binary. We change the
semantic of normalize_dbname so it does following:
1. expects either type binary or list
2. expect any kind of database name
- plain database name
- plain database name with '.couch' extension
- shard name with suffix (creation time)
- shard name with suffix (creation time) and .couch extension
3. always returns a binary containing all components of a database name
4. removes information about shard
5. removes shard's suffix
For cases we need last component of the path (old behaviour) we
intoroduce dbname_suffix/1
COUCHDB-2983
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cloudant/couchdb-couch
2983-change-semantic-of-normalize_dbname
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/couchdb-couch/pull/160.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #160
----
commit 026c5dabd7c421f483a7fc0fd8fc594831aac018
Author: ILYA Khlopotov <[email protected]>
Date: 2016-04-08T17:47:24Z
Change normalize_dbname semantic add dbname_suffix
normalize_dbname used to return last componenent of the shard path. But
it was doing so only if argument was passed as a binary. We change the
semantic of normalize_dbname so it does following:
1. expects either type binary or list
2. expect any kind of database name
- plain database name
- plain database name with '.couch' extension
- shard name with suffix (creation time)
- shard name with suffix (creation time) and .couch extension
3. always returns a binary containing all components of a database name
4. removes information about shard
5. removes shard's suffix
For cases we need last component of the path (old behaviour) we
intoroduce dbname_suffix/1
COUCHDB-2983
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---