You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/12/03 18:39:17 UTC
[GitHub] davisp opened a new pull request #1789: Feature/database partitions
davisp opened a new pull request #1789: Feature/database partitions
URL: https://github.com/apache/couchdb/pull/1789
## Overview
This PR introduces a new feature, user-defined partitioned databases.
A new kind of database can be created with the ?partitioned=true option. All documents within the database must have document ids of the following format;
partition_name:doc_id
both partition_name and doc_id must follow the couchdb id format (can't begin with _, etc).
All documents with the same partition_name are guaranteed to be mapped to the same shard range. When querying an index, the new /db/_partition/$partition/_view endpoint can query the view more efficiently, by only consulting the single shard range holding the partition. This is much more efficient and scales the same way that primary key lookup (GET /dbname/docid) does (approximately linearly).
## Testing recommendations
The PR contains multiple tests for basic functionality and all existing tests still pass. When testing the PR, it is important to try the feature yourself, interactively, with docs and views of your choosing, to give us confidence in this new feature.
## Related Issues or Pull Requests
This supersedes PR #1605.
## Checklist
- [x] Code is written and works correctly;
- [x] Changes are covered by tests;
- [ ] Documentation reflects the changes;
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services