Skip to content

A database already corrupted by the #8169 DROP TYPE alias leak keeps its bucket-less zombie type after the upgrade, silently until the first insert #8187

Closed

Description

@robfrank

Summary

The fix for #8169 stops DROP TYPE from leaving the dropped type's ALIASES in the schema type map, so the
dropped type is no longer re-serialised into schema.json and no longer comes back after a restart. What it
does not do is repair a database that was already corrupted by the bug before the upgrade.

What the residue looks like

A database whose schema.json was written by an affected version carries the dropped type as a real entry with
an empty bucket list, for example:

"Order": {"type":"d","parents":[],"buckets":[],"aliases":["PO"],"properties":{},"indexes":{},"custom":{}}

After the upgrade that entry is still loaded. existsType("Order") answers true, existsType("PO") answers
true, and the only symptom the operator sees is at write time:

SchemaException: Cannot retrieve a bucket for type 'Order' because there are no buckets associated

Why it was out of scope for the #8169 PR

That PR fixes the writer. Repairing state written by an earlier version is a separate concern with its own
decisions to make (repair silently at load, warn and leave it, or expose a command), and folding it into a
one-method fix would have made the regression test unable to tell the two behaviours apart.

The manual remedy, which does now work

With the #8169 fix in place, a second DROP TYPE Order removes the entry for good - the alias goes with it, so
it no longer comes back at the next open. Before the fix the same command left the alias behind and the type
returned. This needs to reach operators, so at minimum:

And worth deciding on:

  • a load-time warning naming any type restored from schema.json with zero buckets, which is not a state
    ordinary DDL can produce and today is silent until the first insert fails.

Follow-up to #8169.

Activity

  1. added
    storage
    engine
    on Sep 22, 2026
  2. added
    severity:minor
    on Sep 22, 2026
  3. added this to the 26.10.1 milestone on Sep 22, 2026
  4. added
    in progress
    on Sep 22, 2026
  5. self-assigned this
    on Sep 22, 2026
  6. added 3 commits that reference this issue on Sep 22, 2026
  7. lvca commented on Sep 23, 2026

    @lvca
    Member

    Fixed in #8226, will be released in 26.10.1.

    A database already affected by #8169 is not repaired automatically, because a type with no buckets can also be the legitimate result of ALTER TYPE ... BUCKET -<bucket>. Instead:

    • when the database opens, a WARNING names every type that has no buckets and no subtypes (so it can never hold a record) and suggests the remedy;
    • the error on insert now suggests the same remedy;
    • DROP TYPE <name> removes the leftover type and its aliases permanently.

    This is also in the 26.10.1 release notes.


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

  8. removed
    in progress
    on Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugengineseverity:minorstorage

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions