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
OrientDB importer silently drops composite indexes/unique constraints (and can NPE on a missing nullValuesIgnored) #6750
The OrientDB importer silently drops composite (multi-field) indexes, so a multi-column UNIQUE constraint enforced by the source database is lost after migration and duplicates can then be inserted. A missing optional field on the same path can also abort index creation entirely with an unboxing NPE.
finalStringfieldName = (String) indexDefinition.get("field"); // null for a composite indexfinalString[] properties = newString[]{fieldName};
booleannullValuesIgnored = (boolean) indexDefinition.get("nullValuesIgnored"); // NPE if absent
...
if (!type.existsPolymorphicProperty(fieldName)) {
if (keyType == null) { /* verbose warning */ ++warnings; continue; } // index dropped
The code only understands the single-property OPropertyIndexDefinition shape. An OCompositeIndexDefinition (JSON key indexDefinitions: [...], no top-level "field"/"keyType") yields fieldName == null and keyType == null, so the index is skipped with only a verbose-level warning.
Repro
Export an OrientDB database with CREATE INDEX Person.name_surname ON Person(firstName, lastName) UNIQUE, then IMPORT DATABASE it. Expected: a composite unique index on [firstName, lastName]. Actual: no index; duplicate (firstName, lastName) pairs that OrientDB rejected are now insertable.
Secondary: if a composite indexDefinition omits nullValuesIgnored, line 1047 unboxes (boolean) null → NullPointerException, aborting createIndexes() for the whole import.
Suggested fix
Detect an indexDefinitionClass ending in OCompositeIndexDefinition and read its indexDefinitions array to build the full property list (and per-field key types); guard the nullValuesIgnored unboxing against a missing/null value.
Scope / confidence
Medium — the single-field-only code path is certain at HEAD; the exact composite JSON shape is inferred from OrientDB's exporter (the bundled orientdb-export-small.gz test resource contains only single-field OPropertyIndexDefinition entries, so this path has no coverage).
Multi-column indexes were dropped during the import. An OrientDB CREATE INDEX Person.name_surname ON Person(firstName, lastName) UNIQUE left the migrated database with no index at all, so duplicate pairs the source database rejected became insertable. They are now imported with all their columns, and any property they need that the export did not declare is created for them.
Two related problems on the same path are gone as well: an index definition that omits the optional nullValuesIgnored field no longer aborts the creation of every index in the import, and an index on a type that has no ArcadeDB equivalent is now skipped on its own instead of stopping the ones after it.
❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.
Activity
fix(#6750): declare a composite index's missing properties only once …
fix(#6749,#6750,#6752): name the offending field in the skipped-index…
Merge pull request #6780 from ArcadeData/fix/6749-6752-importer-and-b…
lvca commentedon Aug 26, 2026
Fixed in #6780, will ship in 26.9.1.
Multi-column indexes were dropped during the import. An OrientDB
CREATE INDEX Person.name_surname ON Person(firstName, lastName) UNIQUEleft the migrated database with no index at all, so duplicate pairs the source database rejected became insertable. They are now imported with all their columns, and any property they need that the export did not declare is created for them.Two related problems on the same path are gone as well: an index definition that omits the optional
nullValuesIgnoredfield no longer aborts the creation of every index in the import, and an index on a type that has no ArcadeDB equivalent is now skipped on its own instead of stopping the ones after it.❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.
fix(ArcadeData#6749,ArcadeData#6750): type OrientDB export numbers fr…