apache/cassandra · error · MarshalException
A local deletion time should not be a legacy overflowed valu
Error message
A local deletion time should not be a legacy overflowed value
What it means
Cells store localDeletionTime == INVALID_DELETION_TIME (a legacy sentinel that once meant an overflowed/unset value) as invalid. Modern Cassandra distinguishes NO_DELETION_TIME and uses real values otherwise; encountering the legacy sentinel during validate() indicates data written by a very old or broken encoder and is rejected with MarshalException.
Source
Thrown at src/java/org/apache/cassandra/db/rows/AbstractCell.java:193
digest.updateWithCounterContext(value(), accessor());
else
digest.update(value(), accessor());
digest.updateWithLong(timestamp())
.updateWithInt(ttl())
.updateWithBoolean(isCounterCell());
if (path() != null)
path().digest(digest);
}
public void validate()
{
if (ttl() < 0)
throw new MarshalException("A TTL should not be negative");
if (localDeletionTime() < 0)
throw new MarshalException("A local deletion time should not be negative");
if (localDeletionTime() == INVALID_DELETION_TIME)
throw new MarshalException("A local deletion time should not be a legacy overflowed value");
if (isExpiring() && localDeletionTime() == NO_DELETION_TIME)
throw new MarshalException("Shoud not have a TTL without an associated local deletion time");
// non-frozen UDTs require both the cell path & value to validate,
// so that logic is pushed down into ColumnMetadata. Tombstone
// validation is done there too as it also involves the cell path
// for complex columns
column().validateCell(this);
}
public boolean hasInvalidDeletions()
{
if (ttl() < 0 || localDeletionTime() == INVALID_DELETION_TIME || localDeletionTime() < 0 || (isExpiring() && localDeletionTime() == NO_DELETION_TIME))
return true;
return false;
}
public long maxTimestamp()View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Scrub and rewrite the SSTables (`nodetool scrub`) to convert legacy values.
- Complete the full upgrade path (do not skip major format upgrades) before reading data.
- Restore data from a backup taken on a supported version.
- Replace the affected cells by rewriting the rows (read/rewrite via CQL where possible).
Example fix
// before: accepting legacy sentinel
if (ldt == INVALID_DELETION_TIME) ldt = NO_DELETION_TIME;
// after: rewrite data through the modern writer instead of silently remapping
if (ldt == INVALID_DELETION_TIME)
throw new MarshalException("legacy overflowed localDeletionTime, scrub required"); Defensive patterns
Strategy: validation
Validate before calling
if (cell.localDeletionTime() == INVALID_DELETION_TIME) throw new IllegalStateException("legacy overflowed localDeletionTime; rewrite data"); Type guard
boolean isModernDeletionTime(AbstractCell<?> c) { return c.localDeletionTime() != INVALID_DELETION_TIME; } Try / catch
try { row.validate(); } catch (MarshalException e) { scheduleScrub(keyspace, table); } Prevention
- Complete all major version upgrade steps before serving reads
- Never hand-migrate SSTables between format eras
- Rewrite legacy data via scrub after upgrade
When it happens
Trigger: Reading SSTables written by legacy versions that used the overflow sentinel; cells whose localDeletionTime equals Integer.MIN_VALUE-derived legacy constants; corrupted data accidentally matching the sentinel.
Common situations: Upgrades from very old Cassandra versions (pre-2.1 era formats); hand-migrated SSTables; corruption repair attempts that re-wrote deletion times incorrectly.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- A local deletion time should not be negative
- Shoud not have a TTL without an associated local deletion ti
- A local deletion time should not be negative in '%s'
- A TTL should not be negative
- REVOKE operation is not supported by AllowAllAuthorizer
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/7a6f1101018de5bc.
Report an issue: GitHub.