The role of CAS in a durability poll?

Yet another note…

If your application ends up getting a KEY_EEXIST, what to do next depends on how your data is structured and whether you have any way of internally keeping track of monotonically increasing increment counters. A CAS value does not necessarily have a monotonic increment (or an increment as all, so it is not a reliable measure).

On the one hand, an EEXISTS may be a result of having a cluster failover and actually receiving the previous version of the item. While it would be rare that you would have a failover which takes place after the item was stored but before the durability poll it is still technically possible.

If you wish to risk the remote possibility mentioned above, normally an EEXISTS will suggest that a subsequent operation has modified the key and the contents are newer and thus it should not be retried. Otherwise probably adding a monotonically increasing counter in your data and reading it back to check if it is higher (i.e. newer) or lower (i.e. older) than its value before the original set, is your best bet.