Skip to content

A re-declaration cannot clear a table's saved expiration or eviction #3934

Open

Description

@kriszyp

Summary

A table's expiration and eviction are saved on its primary catalog row. A later declaration can raise or change them, but never clear them: removing expiration from @table, or declaring expiration: 0, leaves the saved value in place. Every thread that loads the table from the catalog (and every restart) keeps using the old value, while the declaring thread applies 0.

Mechanism

  • persistTableSettings in resources/databases.ts compares and writes expiration/eviction only when the declaration supplies a truthy value, and never deletes a field.
  • Table._adoptCatalogExpiration (added in #3924) adopts only positive catalog values, so it has nothing to clear until the catalog can be cleared.
  • A numeric string such as "0" takes a different path from 0.

Existing for keyed tables before #3924; #3924 makes keyless re-declarations reach the same code. The symmetric-reconcile request on #2564 (for #2480) is the same gap.

Expected

An explicit 0 (and, for schema-authored callers, an omitted value) clears the saved setting on disk and on every thread, without breaking callers that omit the settings because they are not authoring the schema (cluster schema events, add_attribute).

Review-Deferral: 44ea6fd358443b51 severity=major category=correctness
Review-Deferral: 5652d0df30d1a47b severity=major category=correctness

🤖 Generated by Claude Opus 5.5 (Claude Code); posted via @kriszyp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Priority

P2

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions