You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MetaDataProtoEditor record type renames can change indexes declared via the (field).index extension #4733
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
Make `MetaDataProtoEditor` reject renaming record types with indexes …
Make `MetaDataProtoEditor` reject renaming record types with indexes …
robert-brunel commentedon Nov 9, 2026
This issue came up in the code review of #4536:
#4536
Make `MetaDataProtoEditor` reject renaming record types with indexes …