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

refact(exporter): handle concurrent scrape requests #1698

Merged
merged 5 commits into from
May 28, 2020

Conversation

utkarshmani1997
Copy link
Contributor

@utkarshmani1997 utkarshmani1997 commented May 15, 2020

Signed-off-by: Utkarsh Mani Tripathi utkarsh.tripathi@mayadata.io

Why is this PR required? What issue does it fix?:
This commit fixes an issue where it handles the concurrent http
requests and rejects it if a request is already in progress.

What this PR does?:
It adds a new metrics "openebs_target_reject_request_counter" to increase the count
of rejected requests, which can be helpful in debugging and improves mutex locking.

Does this PR require any upgrade changes?:
No
If the changes in this PR are manually verified, list down the scenarios covered::

  • Introduce delay in fake server written in cstor_test.go and send multiple concurrent get requests to
    the exporter, it will only process 1 request at a time and rest other requests will be rejected and new metrics openebs_target_reject_request_counter will be incremented.

Any additional information for your reviewer? :
No

Checklist:

This commit fixes an issue where it handles the concurrent http
requests and rejects it if a request is already in progress.

Additionally it adds a new metrics
"openebs_target_reject_request_counter" to increase the count
of rejected requests, which can be helpful in debugging.

Signed-off-by: Utkarsh Mani Tripathi <utkarsh.tripathi@mayadata.io>
@utkarshmani1997 utkarshmani1997 self-assigned this May 15, 2020
@utkarshmani1997 utkarshmani1997 added refactor type: Monitoring pr/release-note PR should be included in release notes labels May 15, 2020
@vishnuitta vishnuitta requested a review from kmova May 15, 2020 04:34
Signed-off-by: Utkarsh Mani Tripathi <utkarsh.tripathi@mayadata.io>
@vishnuitta vishnuitta removed their request for review May 15, 2020 04:42
@mynktl mynktl added the BUG label May 19, 2020
@mynktl
Copy link
Contributor

mynktl commented May 19, 2020

Are we targeting this PR for 1.11?

@utkarshmani1997
Copy link
Contributor Author

Are we targeting this PR for 1.11?

yes

@mynktl mynktl added this to the 1.11 milestone May 19, 2020
Signed-off-by: Utkarsh Mani Tripathi <utkarsh.tripathi@mayadata.io>
@utkarshmani1997 utkarshmani1997 changed the title refact(exporter): handle concurrent GET http requests refact(exporter): handle concurrent scrape requests May 21, 2020
Signed-off-by: Utkarsh Mani Tripathi <utkarsh.tripathi@mayadata.io>
Signed-off-by: Utkarsh Mani Tripathi <utkarsh.tripathi@mayadata.io>
@kmova kmova merged commit 565dc1a into openebs-archive:master May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG pr/release-note PR should be included in release notes refactor type: Monitoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants