Files
documentdb/internal
Vinod Sridharan 4d0ed51594 Merged PR 1677550: Create indexes inline for create collection
### Does this PR have any customer impact?
Yes

### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Feature

### 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

### ChangeLog (Refer [Template](../oss/CHANGELOG.md))

### Description
If we created the collection in the same command as create indexes, then we don't need to queue it to the index queue - we can just create it since we know we have the lock on the table and it's empty.

Make index builds for created tables faster.

----
#### AI description  (iteration 1)
#### PR Classification
This PR introduces a new feature enhancing the index creation process by building indexes inline when a collection is created.

#### PR Summary
The changes modify the index creation flow to build indexes immediately in the same transaction if the collection is created automatically. This improves efficiency and consistency by reducing asynchronous operations.
- `src/commands/create_indexes_background.c`: Added conditional logic to build indexes inline using `create_indexes_non_concurrently` when `createdCollectionAutomatically` is true and the inline creation is not skipped.
- `src/configs/feature_flag_configs.c`: Introduced the `SkipCreateIndexesOnCreateCollection` boolean flag to control whether indexes should be created inline during collection creation.
- Test output files in various directories were updated to reflect the new behavior by simplifying the index request details in the expected results.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
2025-05-29 12:12:31 +08:00
..