Skip to content

MetaDataProtoEditor record type renames can change indexes declared via the (field).index extension #4733

Description

@robert-brunel

MetaDataProtoEditor.renameRecordType() and MetaDataProtoEditor.renameRecordTypes() rename a record type even if one of its indexes is declared only through the (field).index extension, i.e., by a field with that extension for which MetaData.indexes lists no index.

When such metadata is built with extension options processed (RecordMetaDataBuilder.setRecords(proto, true)), RecordMetaDataBuilder derives the index from the field and names it after its record type, e.g., MySimpleRecord$num_value_3_indexed. After renaming MySimpleRecord to MyNewSimpleRecord, the derived index is named MyNewSimpleRecord$num_value_3_indexed instead. Since the subspace key of an index defaults to its name, it becomes a different index, and its existing entries are no longer found. MetaDataEvolutionValidator rejects the result as an evolution of the original metadata (“index missing in new meta-data”), but the editor itself doesn't detect it.

This mostly concerns record types that MetaData.record_types does not list. Such a record type takes its primary key from the (field).primary_key extension, so its metadata can only be built with extension options processed. An index that MetaData.indexes lists keeps its name across a rename and is not affected.

Activity

  1. self-assigned this
    on Oct 9, 2026
  2. added theissue type on Oct 9, 2026
  3. added a commit that references this issue on Oct 9, 2026
    fa82b4c
  4. added a commit that references this issue on Nov 3, 2026
    8d63cb3
  5. robert-brunel commented on Nov 9, 2026

    @robert-brunel
    ContributorAuthor

    This issue came up in the code review of #4536:
    #4536

  6. added a commit that references this issue on Nov 9, 2026
    f40d1ec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions