Skip to content

DROP PROPERTY leaves a stale default-property cache and breaks record creation #6799

Closed

Description

@GYWang1983

ArcadeDB version

  • Version: 26.8.1
  • Build: 727aa4568cdface314ee15cd242f71d6299b2b0c
  • Standalone server
  • Reproduced through the HTTP SQL API; the original application failure was observed through Bolt/OpenCypher.

Description

Dropping a property that previously had a non-null DEFAULT removes the property from the public schema, but appears to leave its name in the type's internal default-property cache. Subsequent record creation for that type fails in LocalDatabase.setDefaultValues() because getPolymorphicProperty() cannot resolve the dropped property.

This was first observed on an edge type after a property had been created in the ArcadeDB console and later deleted.

Minimal reproduction

Run these commands in a fresh database:

CREATE VERTEX TYPE TestVertex;
CREATE PROPERTY TestVertex.id STRING;
CREATE INDEX ON TestVertex (id) UNIQUE;

CREATE EDGE TYPE TestEdge;
CREATE PROPERTY TestEdge.obsolete STRING;
ALTER PROPERTY TestEdge.obsolete DEFAULT 'legacy';
DROP PROPERTY TestEdge.obsolete;

CREATE VERTEX TestVertex SET id = 'source';
CREATE VERTEX TestVertex SET id = 'target';

CREATE EDGE TestEdge
FROM (SELECT FROM TestVertex WHERE id = 'source')
TO (SELECT FROM TestVertex WHERE id = 'target');

Actual behavior

The final command fails during transaction commit:

com.arcadedb.exception.SchemaException:
Cannot find property 'obsolete' in type 'TestEdge'
    at com.arcadedb.schema.DocumentType.getPolymorphicProperty(DocumentType.java:237)
    at com.arcadedb.database.LocalDatabase.setDefaultValues(LocalDatabase.java:2653)
    at com.arcadedb.database.LocalDatabase.createRecordNoLock(LocalDatabase.java:1026)
    ...

After DROP PROPERTY, the schema query below shows that obsolete is no longer a declared property:

SELECT name, properties FROM schema:types WHERE name = 'TestEdge';

Expected behavior

The edge is created successfully. A dropped property must no longer participate in default-value processing.

Suspected cause

In this build, LocalDocumentType.dropProperty() removes the property from the declared property map, but does not appear to remove its name from propertiesWithDefaultDefined. Later, LocalDatabase.setDefaultValues() iterates that stale name and calls getPolymorphicProperty(), which raises the exception.

For comparison, removing the whole edge type and recreating it did not reproduce the failure; the minimal trigger is dropping a property that previously had a default value.

Activity

  1. added this to the 26.9.1 milestone on Aug 27, 2026
  2. added
    in progress
    on Aug 28, 2026
  3. self-assigned this
    on Aug 28, 2026
  4. added 8 commits that reference this issue on Aug 28, 2026
  5. lvca commented on Aug 28, 2026

    @lvca
    Member

    Fixed in #6861, merged for 26.9.1.

    You were right about the cause. DROP PROPERTY removed the property from the schema but left its name in the type's internal list of properties that have a DEFAULT, so the next record created for that type looked for a property that was no longer there and the commit failed. Restarting the server appeared to fix it because the default is stored on the property itself in schema.json, so reloading the schema rebuilt the list correctly.

    A dropped property now stops taking part in default-value processing immediately, and the two places that maintain that list were merged into one so they cannot disagree again. Two related problems found along the way are fixed too: dropping a property while another connection was setting a default, or saving the schema, could produce the same error or an internal exception.

    One note if you use the embedded Java API: calling setDefaultValue() on a Property object you kept after dropping that property now raises a SchemaException instead of silently succeeding.


    ❤️ 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.

  6. removed
    in progress
    on Aug 28, 2026
  7. added a commit that references this issue on Aug 28, 2026
  8. added
    engine
    on Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugengine

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions