cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedict (JIRA)" <>
Subject [jira] [Updated] (CASSANDRA-14592) Reconcile should not be dependent on nowInSec
Date Tue, 31 Jul 2018 20:15:00 GMT


Benedict updated CASSANDRA-14592:
    Status: Patch Available  (was: Open)

[patch|], [Circle CI|]

> Reconcile should not be dependent on nowInSec
> ---------------------------------------------
>                 Key: CASSANDRA-14592
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Benedict
>            Assignee: Benedict
>            Priority: Major
>             Fix For: 4.0
> To have the arrival time of a mutation on a replica determine the reconciliation priority
seems to provide for unintuitive database behaviour.  It seems we should formalise our reconciliation
logic in a manner that does not depend on this, and modify our internal APIs to prevent this
> Take the following example, where both writes have the same timestamp:
> Write X with a value A, TTL of 1s
> Write Y with a value B, no TTL
> If X and Y arrive on replicas in < 1s, X and Y are both live, so record Y wins the
reconciliation.  The value B appears in the database.
> However, if X and Y arrive on replicas in > 1s, X is now (effectively) a tombstone. 
This wins the reconciliation race, and NO value is the result.
> Note that the weirdness of this is more pronounced than it might first appear.  If write
X gets stuck in hints for a period on the coordinator to one replica, the value B appears
in the database until the hint is replayed.  So now we’re in a very uncertain state - will
hints get replayed or not?  If they do, the value B will disappear; if they don’t it won’t. 
This is despite a QUORUM of replicas ACKing both writes, and a QUORUM of readers being engaged
on read; the database still changes state to the user suddenly at some arbitrary future point
in time.
> It seems to me that a simple solution to this, is to permit TTL’d data to always win
a reconciliation against non-TTL’d data (of same timestamp), so that we are consistent across
TTLs being transformed into tombstones.
> 4.0 seems like a good opportunity to fix this behaviour, and mention in CHANGES.txt.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message