Quantcast
Channel: Akka Libraries - Discussion Forum for Akka technologies
Viewing all articles
Browse latest Browse all 1369

Understanding the Cassandra journal table design. why timestamp in the primary key?

$
0
0

Hi,

Looking at the doc, I have a question about the akka.messages table. Why is timestamp included in the primary key?

If I understand the doc correctly, it is needed by the events by tag query, not by the persistent actors.
It seems that it shouldn’t be part of the primary key.
One problem I see is that when two writers (serializers) are persisting two events for the same entity ID and sequence number but with different timestamp (since its value is generated by the serializer, which is my understanding after checking the source code.), the conflict won’t be detected by any writer. The problem will show up when the actor recovers from events.
If timestamp were not in the primary key, at least one of the two writers would fail.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 1369

Latest Images

Trending Articles



Latest Images