mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-07 03:22:46 -05:00
### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Logging ### 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? ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description 1) Track whether or not the index is TTL 2) Track numPaths different from numKeys (needed for composite) 3) Track whether it's a composite index or not Also add a check that checks that the PG index is valid as part of updating the stats before marking the index as valid in the documentdb Catalog ---- #### AI description (iteration 1) #### PR Classification Enhancement: The pull request updates index policy logging by adding new metadata fields and refining index property validations. #### PR Summary This pull request enriches index policy logging by incorporating new utility functions and metadata details to better capture index characteristics and ensure index integrity. - **`src/metadata/index.c`**: Added `IndexSpecIsWildcardIndex` and `IndexSpecIsOrderedIndex` functions to determine index types. - **`src/utils/index_policies_utils.c`**: Enhanced `BuildIndexMetricLog` by logging additional fields such as `numPaths`, `hasTtl`, `hasPfe`, and computing the wildcard and ordered index flags. - **`include/metadata/index.h`**: Introduced new inline functions for boolean conversion with default behaviors. - **Commands modules** (`create_indexes.c`, `coll_mod.c`, and `drop_indexes.c`): Updated validations (e.g., checking index liveliness) and adjusted boolean handling to align with the new metadata scheme. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->