-
Notifications
You must be signed in to change notification settings - Fork 391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Background Manager Integration with Handoff #484
Merged
Merged
Commits on Dec 20, 2013
-
Add a background lock and task manager module to riak core.
* The goal is to allow riak sub-systems to coordinate use of shared resources, * e.g. protect from concurrent vnode folds on the same partition. * Locks and tokens have a settable maximum concurrency limit. * "Taken" locks and tokens are tracked in an ETS table. * max_concurrency is returned when the set limits are reached. * Processes that take locks are monitored. * Locks are released when the taking processes terminate. * Tokens are refreshed at a specified periodic rate. * Token processes are not monitored because tokens never "release". * A table manager is introduced to add persistence across process crashes, * and to allow proper table transfer to occur without losing the table. * An EQC test exercises the majority of the API. see test/bg_manager_eqc.erl * See the original PR for background manager here: #364
Configuration menu - View commit details
-
Copy full SHA for 779273b - Browse repository at this point
Copy the full SHA 779273bView commit details -
Concurrency API should return 'undefined' for limits when the ETS tab…
…le is unavailable * Allows callers to try again later
Configuration menu - View commit details
-
Copy full SHA for f29014b - Browse repository at this point
Copy the full SHA f29014bView commit details -
* Remove history API, use unregistered to signal unavailability of bg-mgr, fix set_token_rate bug. * Prune the query API down to a consistent set of commands and adjust tests. * Change query API to use named ETS table directly; is not threaded through the gen_server.
Configuration menu - View commit details
-
Copy full SHA for 4eead17 - Browse repository at this point
Copy the full SHA 4eead17View commit details -
Re-implement handoff integration.
* rebase on latest background manager. * Add an optional callback entry point to the kv vnode: handoff_started/2 * core_vnode will check for the optional function and call if present * returning max_concurrency will cause the handoff to be aborted and retried.
Configuration menu - View commit details
-
Copy full SHA for 23f9464 - Browse repository at this point
Copy the full SHA 23f9464View commit details -
Address remaining issues in PR
* Remove lock defs file; it was moved to riak_kv_vnode.hrl since all these locks are KV-specific * The optional call to handoff_started/2 allows vnodes one last chance to abort the handoff process. the function is passed the source vnode's partition number and node name (this node) because the callback does not have access to the full vnode state at this time. In addition the worker pid is passed so the vnode may use that information in its decision to cancel the handoff or not (e.g. get a lock on behalf of the process) * Move code that calls handooff_started/2 into separate function and put the call inside the try/catch.
Configuration menu - View commit details
-
Copy full SHA for ae6b3f8 - Browse repository at this point
Copy the full SHA ae6b3f8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 66a4f65 - Browse repository at this point
Copy the full SHA 66a4f65View commit details -
Configuration menu - View commit details
-
Copy full SHA for c770a72 - Browse repository at this point
Copy the full SHA c770a72View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.