Skip to content

feat: support UUID document ids#4681

Open
sanikolaev wants to merge 15 commits into
mainfrom
fix/uuid-primary-ids-1429
Open

feat: support UUID document ids#4681
sanikolaev wants to merge 15 commits into
mainfrom
fix/uuid-primary-ids-1429

Conversation

@sanikolaev

Copy link
Copy Markdown
Collaborator

Add UUID as a document id type backed by an internal numeric DocID_t surrogate and hidden UUID string storage.

Related issue #1429

Add UUID as a document id type backed by an internal numeric DocID_t surrogate and hidden UUID string storage.

Related issue #1429
Use the schema @id locator when MatchIterator sorts and dedupes merged result sets. UUID agent replies append the internal numeric @id dynamically, so reading row offset 0 can collapse distinct remote UUID rows during distributed HTTP/JSON result merging.

Test: php test/ubertest.php t --no-demo --strict-verbose --cwd -b /Users/sn/manticore_uuid/build/src/ -t /tmp/mcore-test517.JX5ycr/ -tt /tmp/mcore-test517.JX5ycr/ 517
Relax the UUID id DDL gate to allow sharded wrapper tables while still rejecting unsupported non-RT table types. Extend test_517 to cover sharded UUID create/describe/show, explicit and generated inserts, duplicate rejection, replace, update, delete, SQL reads, and HTTP search by UUID id.
Support UUID primary ids across DML/API boundary cases by keeping the hidden UUID storage attr reserved, validating JSON/bulk numeric ids on UUID tables, preserving transaction-local UUID to DocID mappings, and ensuring delete/update collectors keep internal numeric docids available while still allowing public UUID filters.\n\nExtend UUID id coverage in test_517 for transaction duplicates, hidden @uuid_id DDL rejection, JSON/bulk validation, and rowwise/columnar JSON delete paths.
Reject internal @id/@uuid_id access consistently for UUID-id tables, preserve public UUID id behavior, document the UUID-shaped id contract, and extend the focused UUID regression coverage for REPLACE, distributed, JSON, ES, and columnar paths.
Detect UUID primary ids for ES bulk writes to shard tables, reject user-defined @id on UUID-id tables, and extend test_517 coverage for the shard bulk and DDL guardrails.
Validate UUID primary ids with version/variant checks, map UUID public-boundary validation failures to HTTP 400, reject internal id projections through ES fields/stored_fields, and keep aggregate errors on public id wording.

Extend test_517 coverage and regenerate its model for strict UUID validation, projection guards, and hidden @uuid_id leak prevention.
@sanikolaev sanikolaev requested a review from tomatolog July 2, 2026 07:58
Add hash-backed UUID transaction state and a committed RT RAM @uuid_id lookup map for hot explicit UUID insert/replace paths.

Keep disk/flushed chunk behavior on the existing query/SI-capable fallback path, hide the internal @uuid_id secondary index from user-facing listings, and update the UUID primary-id spec with the RAM lookup and benchmark results.

Verified with:
- cmake --build build --target searchd indexer indextool -j8
- php ubertest.php gen/t test_517
- php ubertest.php gen/t test_518
- php ubertest.php gen/t test_519
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant