mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 11:49:53 -05:00
### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Feature/Bugfix ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) No ### Are you introducing any new config? If yes, do you have tests with and without them being set? Yes ### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md)) ### Description Fix up truncation for unique indexes behind a flag. - This is part 1 of many. This makes unique conflicts with truncation harder to hit with the hash of the untruncated value stored as a compound term with the shard_key. - Subsequent changes should make it so that even on hash collision the values should be validated. ---- #### AI description (iteration 1) #### PR Classification New feature #### PR Summary This pull request introduces support for creating unique indexes with truncation in the Helio API. - `helio_api_init.c`: Added a new configuration `enable_large_unique_index_keys` to allow large unique index keys. - `create_indexes.c`: Modified logic to support large unique index keys and handle truncation. - `bson_unique_index.sql` and `bson_unique_index.out`: Added tests for creating unique indexes with and without truncation. - `helio_distributed_test_helpers.sql` and `helio_distributed_test_helpers.out`: Added tests for native colocation settings. - `Makefile` and related files: Added a new `check-dist-minimal` target for minimal distributed tests.