On client generated timestamps...

On Mon, Sep 20, 2021 at 7:17 PM Joseph Lynch <joe.e.ly...@gmail.com> wrote:

> * Relatedly I'm curious if there is any way that the client can
> acquire the timestamp used by the transaction before sending the data
> so we can make the operations idempotent and unrelated to the
> coordinator that was executing them as the storage nodes are
> vulnerable to disk and heap failure modes which makes them much more
> likely to enter grey failure (slow). Alternatively, perhaps it would
> make sense to introduce a set of optional dedicated C* nodes for
> reaching consensus that do not act as storage nodes so we don't have
> to worry about hanging coordinators (join_ring=false?)?
>


I've thought about this myself some time ago. The answer is yes, the client
could generate its own timestamps, provided that the client is also in sync
with the clock of the cluster. The coordinator that receives the
transaction from the client would simply need to enforce that the client
generated timestamp is within the margin that would be acceptable if the
coordinator itself had generated the timestamp. In addition, coordinator
must ensure that the transaction id is unique.

But... This still wouldn't give you idempotency in itself. This is because
if something failed with the transaction, you cannot resend the same
timestamp later, because it would now be outside the acceptable range of
timestamps. (Expired, if you will.) At best maybe the client could somehow
use the (timestamp, id) to query a node to verify whether such a
transaction was recently committed. I'm unsure whether that's convenient
for a user though.

henrik

-- 

Henrik Ingo

+358 40 569 7354 <358405697354>

[image: Visit us online.] <https://www.datastax.com/>  [image: Visit us on
Twitter.] <https://twitter.com/DataStaxEng>  [image: Visit us on YouTube.]
<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.youtube.com_channel_UCqA6zOSMpQ55vvguq4Y0jAg&d=DwMFaQ&c=adz96Xi0w1RHqtPMowiL2g&r=IFj3MdIKYLLXIUhYdUGB0cTzTlxyCb7_VUmICBaYilU&m=bmIfaie9O3fWJAu6lESvWj3HajV4VFwgwgVuKmxKZmE&s=16sY48_kvIb7sRQORknZrr3V8iLTfemFKbMVNZhdwgw&e=>
  [image: Visit my LinkedIn profile.] <https://www.linkedin.com/in/heingo/>

Reply via email to