Skip to content

Conversation

@dai-chen
Copy link
Collaborator

@dai-chen dai-chen commented Mar 15, 2024

Description

Implemented the VACUUM index statement in the plugin. The semantics slightly differ from what's defined in Flint Spark: similar to the current DROP index logic in the plugin, the vacuum operation can transition from REFRESHING, ACTIVE, or DELETED states directly, instead of only accepting DELETED.

Issues Resolved

opensearch-project/opensearch-spark#104

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

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: Chen Dai <daichen@amazon.com>
Signed-off-by: Chen Dai <daichen@amazon.com>
@dai-chen dai-chen added enhancement New feature or request backport 2.x labels Mar 15, 2024
@dai-chen dai-chen self-assigned this Mar 15, 2024
@codecov
Copy link

codecov bot commented Mar 15, 2024

Codecov Report

Attention: Patch coverage is 88.23529% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 95.50%. Comparing base (d11a268) to head (2fd27b8).

Files Patch % Lines
...rch/sql/spark/execution/statestore/StateStore.java 45.45% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2557      +/-   ##
============================================
- Coverage     95.53%   95.50%   -0.03%     
- Complexity     5101     5113      +12     
============================================
  Files           488      489       +1     
  Lines         14261    14310      +49     
  Branches        958      961       +3     
============================================
+ Hits          13624    13667      +43     
- Misses          614      618       +4     
- Partials         23       25       +2     
Flag Coverage Δ
sql-engine 95.50% <88.23%> (-0.03%) ⬇️

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: Chen Dai <daichen@amazon.com>
Signed-off-by: Chen Dai <daichen@amazon.com>
Signed-off-by: Chen Dai <daichen@amazon.com>
Signed-off-by: Chen Dai <daichen@amazon.com>
Signed-off-by: Chen Dai <daichen@amazon.com>
@dai-chen
Copy link
Collaborator Author

Will address conflicts once #2554 merged

@dai-chen dai-chen requested a review from GumpacG as a code owner March 18, 2024 18:37
Signed-off-by: Chen Dai <daichen@amazon.com>
Signed-off-by: Chen Dai <daichen@amazon.com>
Signed-off-by: Chen Dai <daichen@amazon.com>
stateStore, dispatchQueryRequest.getDatasource(), emrServerlessClient);
try {
tryDropOp.apply(indexMetadata);
} catch (IllegalStateException e) {
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to ignore only IllegalStateException or any kind of error?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think only the IllegalStateException thrown from validation? If any exception occurred during operation and commit, there is no need to continue.

@dai-chen dai-chen merged commit 8374cb6 into opensearch-project:main Mar 19, 2024
@dai-chen dai-chen deleted the implement-vacuum-operation branch March 19, 2024 03:17
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 19, 2024
* Add vacuum operation and IT

Signed-off-by: Chen Dai <daichen@amazon.com>

* Add index state doc delete and more IT

Signed-off-by: Chen Dai <daichen@amazon.com>

* Refactor IT

Signed-off-by: Chen Dai <daichen@amazon.com>

* Fix bytebuddy version conflict

Signed-off-by: Chen Dai <daichen@amazon.com>

* Fix broken IT

Signed-off-by: Chen Dai <daichen@amazon.com>

* Fix broken IT

Signed-off-by: Chen Dai <daichen@amazon.com>

* Fix jacoco failure with new IT

Signed-off-by: Chen Dai <daichen@amazon.com>

* Fix code format

Signed-off-by: Chen Dai <daichen@amazon.com>

* Fix jacoco test coverage

Signed-off-by: Chen Dai <daichen@amazon.com>

---------

Signed-off-by: Chen Dai <daichen@amazon.com>
(cherry picked from commit 8374cb6)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
dai-chen pushed a commit that referenced this pull request Mar 19, 2024
* Add vacuum operation and IT



* Add index state doc delete and more IT



* Refactor IT



* Fix bytebuddy version conflict



* Fix broken IT



* Fix broken IT



* Fix jacoco failure with new IT



* Fix code format



* Fix jacoco test coverage



---------


(cherry picked from commit 8374cb6)

Signed-off-by: Chen Dai <daichen@amazon.com>
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>
@dai-chen dai-chen added the v2.13.0 Issues targeting release v2.13.0 label Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.x enhancement New feature or request v2.13.0 Issues targeting release v2.13.0

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants