You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users can currently fake out multiple collections by explicitly adding a short collection name prefix to each of their keys. However, such a trick is suboptimal as it repeats a prefix for every key-val item.
Instead, a proposal to support multiple collections natively in moss would be by introducing a few additional methods to the API, so that we remain backwards compatible for current moss users.
The idea is that the current Collection in moss now logically becomes a "top-most" collection of an optional hierarchy of child collections.
To the Batch interface, the proposal is to add the methods...
The proposed API allows for deeply nested child collections of child collections, but the initial implementation might just return an error if the user tries to have deep nesting.
The text was updated successfully, but these errors were encountered:
Implementations of Collection & Snapshot interfaces
now have recursive maps of childCollections & childSnapshots
respectively. These process new child batches from incoming
batches and apply all operations recursively on to
child collections.
Background operations of merger & persister are child
collection aware and recursively process the same.
+Incarnation numbers to handle fast collection recreation.
Implmentation as per design detailed here
#7
Change-Id: I2c30217a88813e7cf01ed1181d56472131d1c473
Reviewed-on: http://review.couchbase.org/72254
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Sundararaman Sridharan <sundar@couchbase.com>
Users can currently fake out multiple collections by explicitly adding a short collection name prefix to each of their keys. However, such a trick is suboptimal as it repeats a prefix for every key-val item.
Instead, a proposal to support multiple collections natively in moss would be by introducing a few additional methods to the API, so that we remain backwards compatible for current moss users.
The idea is that the current Collection in moss now logically becomes a "top-most" collection of an optional hierarchy of child collections.
To the Batch interface, the proposal is to add the methods...
When a batch is executed, the entire hierarchy of a top-level batch and its batches for any child collections will be committed atomically.
Removing a child collection takes precedence over adding more child collection mutations.
To the Snapshot interface, the proposal is to add the methods...
And, that's it.
The proposed API allows for deeply nested child collections of child collections, but the initial implementation might just return an error if the user tries to have deep nesting.
The text was updated successfully, but these errors were encountered: