opensearch-project / sql

Query your data using familiar SQL or intuitive Piped Processing Language (PPL)
https://opensearch.org/docs/latest/search-plugins/sql/index/
Apache License 2.0
120 stars 139 forks source link

[FEATURE] Enforce Flint SQL statements for index management to prevent direct deletions #3073

Open dai-chen opened 1 month ago

dai-chen commented 1 month ago

Is your feature request related to a problem?

Users sometimes bypass Flint SQL and delete Flint data indexes directly in OpenSearch using the REST endpoint. This can lead to inconsistencies and errors, as Flint is not aware of these deletions, and crucial metadata is not updated, disrupting features like index acceleration and query rewrites.

What solution would you like?

I propose implementing a way to enforce the use of Flint SQL statements (e.g., DROP and VACUUM index) for index management. This could involve disabling direct index deletions via OpenSearch REST, or issuing warnings and logs when Flint indexes are deleted outside of Flint SQL, ensuring that metadata remains consistent.

Technical Challenges:

What alternatives have you considered?

Do you have any additional context?

N/A