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

Call LeaseManager for BatchQuery #3153

Merged
merged 4 commits into from
Nov 14, 2024

Conversation

ykmr1224
Copy link
Collaborator

Description

  • Call LeaseManager for BatchQuery
    • Currently, LeaseManager.borrow is not called for BatchQuery

Related Issues

n/a

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • New functionality has javadoc added.
  • New functionality has a user manual doc added.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Tomoyuki Morita <[email protected]>
@ykmr1224 ykmr1224 added backport 2.x maintenance Improves code quality, but not the product labels Nov 13, 2024
Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.48%. Comparing base (cfe38d7) to head (dba09c4).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #3153   +/-   ##
=========================================
  Coverage     94.48%   94.48%           
- Complexity     5426     5428    +2     
=========================================
  Files           528      528           
  Lines         15452    15456    +4     
  Branches       1025     1025           
=========================================
+ Hits          14600    14604    +4     
  Misses          804      804           
  Partials         48       48           
Flag Coverage Δ
sql-engine 94.48% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Tomoyuki Morita <[email protected]>
Signed-off-by: Tomoyuki Morita <[email protected]>
Signed-off-by: Tomoyuki Morita <[email protected]>
@ykmr1224
Copy link
Collaborator Author

CI failure is due to coverage caused by: #3063

Copy link
Collaborator

@noCharger noCharger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

High level questions

  1. Does the current class model meet the requirements for extending to another implementation?

public DefaultLeaseManager defaultLeaseManager(Settings settings, StateStore stateStore) {
return new DefaultLeaseManager(settings, stateStore);
}

  1. Will this code change to BatchQueryHandler and RefreshQueryHandler affect the present logic of examining ConcurrentRefreshJobRule?

@ykmr1224
Copy link
Collaborator Author

  1. Does the current class model meet the requirements for extending to another implementation?

public DefaultLeaseManager defaultLeaseManager(Settings settings, StateStore stateStore) {
return new DefaultLeaseManager(settings, stateStore);
}

Yes, DQS will internally check running jobs and limit new execution.

  1. Will this code change to BatchQueryHandler and RefreshQueryHandler affect the present logic of examining ConcurrentRefreshJobRule?

It won't affect. I excluded Batch query from ConcurrentRefreshJobRule.

@noCharger noCharger closed this Nov 14, 2024
@noCharger noCharger reopened this Nov 14, 2024
Copy link
Collaborator

@dai-chen dai-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you elaborate a little what was the issue?

@ykmr1224
Copy link
Collaborator Author

Could you elaborate a little what was the issue?

DQS couldn't cover the Batch query to avoid too many concurrent execution.

@ykmr1224 ykmr1224 merged commit 5b3cdd8 into opensearch-project:main Nov 14, 2024
24 of 29 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 14, 2024
* Call LeaseManager for BatchQuery

Signed-off-by: Tomoyuki Morita <[email protected]>

* Reformat code

Signed-off-by: Tomoyuki Morita <[email protected]>

* Fix unit test for coverage

Signed-off-by: Tomoyuki Morita <[email protected]>

* Reformat

Signed-off-by: Tomoyuki Morita <[email protected]>

---------

Signed-off-by: Tomoyuki Morita <[email protected]>
(cherry picked from commit 5b3cdd8)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ykmr1224 pushed a commit that referenced this pull request Nov 14, 2024
* Call LeaseManager for BatchQuery



* Reformat code



* Fix unit test for coverage



* Reformat



---------


(cherry picked from commit 5b3cdd8)

Signed-off-by: Tomoyuki Morita <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x maintenance Improves code quality, but not the product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants