Feature Proposal: AAE Exclude Bucket Property #14
Replies: 2 comments 1 reply
-
|
With regards to naming, there is the question of whether the bucket property should be named by "what it does" or " what we expect it to be used for"? For example, this is a feature intended for temporary objects that don't need the usual anti-entropy (and potentially inter-cluster resilience): so the bucket property could be But perhaps for expert users, that keep a mental model of how things work, a name which is more explicitly about what it does might be preferable (e.g. the proposed |
Beta Was this translation helpful? Give feedback.
-
|
Some detail of the planned implementation. As part of this it is suggested that the property be renamed |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Background
AAE is currently all-or-nothing in a cluster - enabling TictacAAE will turn on AAE for all buckets.
There may be certain buckets where data resilience is less important, and so it would be beneficial to exclude these buckets from AAE - so that the AAE caches do not contain knowledge of these buckets, and those buckets could have other properties that would otherwise conflict with intra-cluster AAE and inter-cluster full-sync.
This would mean that real-time replication could be optional for those buckets, as a failure to replicate would not lead a full-sync failure. So if a specific bucket was to be local, whereas the rest of the buckets were to be replicated - AAE Exclude bucket property could be enforced for that bucket, the bucket could be excluded from the real-time repl config - and full-sync would still work.
This would also allow for a TTL to be applied for that specific bucket (without the need for an eraser job), as this would not cause AAE failures after tree rebuilds
Proposal
Add an
aae_excludebucket property, which is false by default.Keys could still be repaired by read_repair, and still included in hinted handoffs (and transfers). So this is suited to short-lived data (i.e. less than 3 months), where long-term entropy is not an issue.
As an extension there could be a
ttloption possible on a bucket, which may be enabled if and only theaae_excludeoption is set - as keys could now be auto-expired, without impacting AAE.Design
Work ongoing:
excluded_buckets, which is potentially updated every time there is an update to bucket properties (if the list of excluded buckets has changed). This would allow exclusion in folds to be a simplelists:member/1check.Alternative Design Ideas
.If a per-bucket TTL property is to be added, then it will probably need to be a leveled-only feature. For bitcask, an expiry setting is store-wide, and there is not an obvious and simple way of making it more specific - and certainly getting the same behaviour as with leveled (for example setting expiry per object at PUT time).
For this reason, it may be preferable to stick with eraser jobs as an answer to expiry, rather than try and make significant changes to bitcask. Currently eraser depends on operator prompting, but perhaps instead there should be a
riak_kv_eraser_manager- that would look for buckets with expiry enabled, and periodically trigger eraser activity to garbage collect these buckets.Testing
OpenRiak/riak_test#9
Caveats
...
Pull Requests
martinsumner/kv_index_tictactree#131
This PR adds support for a
key_filterfunction to both theaae_controllerand theaae_exchange. For each key/clock to be added to the cached tree (either due to aae_put or a a rebuild/rehash) the controllerkey_filterwill be run against the inputted Bucket/Key pair - if it returns true, it will be added to the cache, otherwise it will not be added. Additionally on an exchange, the key filter will filter the Keys/Clocks being passed intocompare_clocks.In our case it is expected that the filter function will look only at the bucket part of the key, and check the bucket properties and return
trueunless theaae_tree_excludeproperty is present. It is assumed that there may be a desire to cache results of this proporty check, so anaae_controller:aae_reset_key_filter/1function has been added to the API which will send aresetatom to the filter function to clear any cache.Planned Release for Inclusion
Riak 3.4
Beta Was this translation helpful? Give feedback.
All reactions