Closed
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds S3 + Elasticsearch as a first-class polyglot persistence mode in HFS via
CompositeStorage, exposed as:HFS_STORAGE_BACKEND=s3-elasticsearchs3-es,objectstore-elasticsearchIn this mode:
_search,_text,_content, counts, includes/revincludes).Why
We already supported SQL+Elasticsearch offloading (
sqlite-elasticsearch,postgres-elasticsearch) and had an S3 storage backend. This PR completes the polyglot model by enabling object-storage-first persistence with dedicated search indexing, aligned with the persistence architecture goals.What Changed
1) First-class backend wiring (
s3-elasticsearch)s3ands3-elasticsearchstartup paths.2) Composite routing guarantees
SearchProvidercapability is not required3) Sync semantics and idempotency
4) Elasticsearch backend hardening
meta.versionIdfor conflict-safe indexing.5) Reindex/repair path
6) Documentation
s3-elasticsearchmode usagecrates/persistence/docs/s3-elasticsearch/M1.mdcrates/persistence/docs/s3-elasticsearch/M2.mdcrates/persistence/docs/s3-elasticsearch/M3.mdcrates/persistence/docs/s3-elasticsearch/M4.mdcrates/persistence/docs/s3-elasticsearch/IMPLEMENTATION.mdConfig Surface Added/Used
HFS_STORAGE_BACKEND=s3-elasticsearchHFS_S3_TENANCY_MODE,HFS_S3_BUCKET,HFS_S3_TENANT_BUCKET_MAP,HFS_S3_DEFAULT_SYSTEM_BUCKET,HFS_S3_REGION,HFS_S3_PREFIX,HFS_S3_ENDPOINT_URL,HFS_S3_FORCE_PATH_STYLE,HFS_S3_ALLOW_HTTP,HFS_S3_VALIDATE_BUCKETSHFS_ELASTICSEARCH_NODES,HFS_ELASTICSEARCH_INDEX_PREFIX,HFS_ELASTICSEARCH_USERNAME,HFS_ELASTICSEARCH_PASSWORDHFS_S3_ES_REINDEX_ON_STARTUP,HFS_S3_ES_REINDEX_BATCH_SIZE,HFS_S3_ES_REINDEX_CLEAR_EXISTING,HFS_S3_ES_REINDEX_RESOURCE_TYPESTesting
Added/updated coverage for:
Validation run:
cargo fmt --allcargo test -p helios-restcargo test -p helios-hfs --features s3,elasticsearchcargo test -p helios-persistence --features s3,elasticsearch --test composite_s3_elasticsearch_testscargo test -p helios-persistence --features s3,elasticsearch --test elasticsearch_tests -- --skip es_integrationcargo test -p helios-persistence --features s3,elasticsearch --test minio_s3_elasticsearch_testscargo clippy -p helios-persistence -p helios-rest -p helios-hfs --all-targets --features s3,elasticsearch -- -D warnings ...Behavior and Compatibility Notes
sqlite-elasticsearch/postgres-elasticsearchbehavior.