- Notifications
You must be signed in to change notification settings - Fork690
[DRAFT DO NOT REVIEW] Wip limit max threads to server#7865
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Draft
albertogpz wants to merge4 commits intoapache:developChoose a base branch fromNordix:wip/handle_max_threads_to_server
base:develop
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Works for puts, gets and transactions andthem also within functions.This solution allows to limit the number of threadshandling client requests in a server waiting fora response from a given server.For example, if we configure the system to allowat max 1/2 of the available threads to handle client requestsbusy towards a given server, supposing we have a4 servers system with MAX_THREADS=8, if at a given pointin time server1 has 4 threads busy waiting to get aresponse from server2 and another request comes to server1that would require to communicate with server2,the request will be rejected.This feature could be used in situations when a server is not respondingor is responding slowly in order to limit the number of serverthreads (in the rest of servers) to handle client requests that arebusy waiting for an answer from the problematic server.This way, even if a server is not responding or is being veryslow, there will always be some threads available to handleclient requests in the healthy servers.As a result, a non-responding server would not eventuallyprovoke a 100% traffic loss.In order to implement this feature, a new observer typehas been created (SendReceiveMessageObserver).Calls to this observer have been added beforea put, get or transaction needs to go to another server(before any change has been made locally) andafter the response has been received.With a particular implementation of this observer(see GenericDunitTest.MySendReceiveMessageObserver)that keeps track of the number of threads waiting foran answer to each servers, operations may be rejectedif the limit has been surpassed.In GenericDUnitTest that observer is set in theservers and the functionality can be testedmanually by looking at the logs.Some refactorings and renamings
ec4bbb7
to5087bb8
Compare…d add function to sanctioned data serializables
5087bb8
toa1ee7c3
CompareSign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
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.
For all changes:
Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
Has your PR been rebased against the latest commit within the target branch (typically
develop
)?Is your initial contribution a single, squashed commit?
Does
gradlew build
run cleanly?Have you written or updated unit tests to verify your changes?
If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion underASF 2.0?