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

[Backport 2.x] Add Flint Index Purging Logic #2388

Merged
merged 1 commit into from
Oct 28, 2023

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

Backport 1bcacd1 from #2372.

* Add Flint Index Purging Logic

- Introduce dynamic settings for enabling/disabling purging and controlling index TTL.
- Reuse default result index name as a common prefix for all result indices.
- Change result index to a non-hidden index for better user experience.
- Allow custom result index specification in the data source.
- Move default result index name from spark to core package to avoid cross-package references.
- Add validation for provided result index name in the data source.
- Use pattern prefix + data source name for default result index naming.

Testing:
- Verified old documents are purged in a cluster setup.
- Checked result index naming with and without custom names, ensuring validation is applied.

Note: Tests will be added in a subsequent PR.

Signed-off-by: Kaituo Li <[email protected]>

* address comments

Signed-off-by: Kaituo Li <[email protected]>

---------

Signed-off-by: Kaituo Li <[email protected]>
(cherry picked from commit 1bcacd1)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Oct 28, 2023

Codecov Report

Merging #2388 (88e9e02) into 2.x (6dd1899) will decrease coverage by 0.90%.
The diff coverage is 14.00%.

@@             Coverage Diff              @@
##                2.x    #2388      +/-   ##
============================================
- Coverage     96.50%   95.61%   -0.90%     
  Complexity     4955     4955              
============================================
  Files           466      469       +3     
  Lines         13690    13836     +146     
  Branches        916      918       +2     
============================================
+ Hits          13212    13229      +17     
- Misses          458      587     +129     
  Partials         20       20              
Flag Coverage Δ
sql-engine 95.61% <14.00%> (-0.90%) ⬇️

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

Files Coverage Δ
...rch/sql/opensearch/setting/OpenSearchSettings.java 100.00% <100.00%> (ø)
...org/opensearch/sql/spark/client/EmrClientImpl.java 100.00% <ø> (ø)
...arch/sql/spark/client/EmrServerlessClientImpl.java 100.00% <100.00%> (ø)
...earch/sql/spark/data/constants/SparkConstants.java 0.00% <ø> (ø)
...sql/spark/response/JobExecutionResponseReader.java 100.00% <100.00%> (ø)
...g/opensearch/sql/spark/response/SparkResponse.java 100.00% <100.00%> (ø)
...org/opensearch/sql/spark/cluster/IndexCleanup.java 0.00% <0.00%> (ø)
...nsearch/sql/spark/cluster/FlintIndexRetention.java 0.00% <0.00%> (ø)
...sql/spark/cluster/ClusterManagerEventListener.java 0.00% <0.00%> (ø)

@penghuo penghuo merged commit 59e36a7 into 2.x Oct 28, 2023
29 of 34 checks passed
@github-actions github-actions bot deleted the backport/backport-2372-to-2.x branch October 28, 2023 00:18
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.

2 participants