Skip to content
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

Distribute to all nodes if the load is low to medium #99

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

vadmeste
Copy link
Member

No description provided.

@vadmeste vadmeste requested a review from jiuker February 13, 2024 16:57
@poornas
Copy link
Collaborator

poornas commented Feb 13, 2024

@vadmeste ,

			backend.Stats.CurrentCalls.Add(-1)
			backend.Stats.LastFinished.Store(time.Now().UnixNano())

this should be done in UpdateCallStats after the call finishes, not after choosing the backend - otherwise it will always pick the last backend. your fix will only make it work to pick a random backend which is anyway the default.

@vadmeste
Copy link
Member Author

@poornas sorry I am not able to understand. Are you saying there is an issue in this PR or an issue in unrelated another code ?

Also this

backend.Stats.CurrentCalls.Add(-1)
backend.Stats.LastFinished.Store(time.Now().UnixNano())

is executed after the call finishes already. nextProxy() returns a function that will be executed when the call finishes

@poornas
Copy link
Collaborator

poornas commented Feb 13, 2024

is executed after the call finishes already. nextProxy() returns a function that will be executed when the call finishes

oops, you are right. missed that

@harshavardhana harshavardhana merged commit a245df1 into minio:master Feb 15, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants