gpengtao
gpengtao

Reputation: 225

cassandra trigger execution sequence

I want to use cassandra tigger to import my data to elasticsearch for searching.

Considering the data consistency, I hope they execute atomically.

So I want to know the trigger of the execution sequence, together with "write commitlog","memtable", "index" atomically, or the trigger is completely asynchronous?

Upvotes: 0

Views: 97

Answers (1)

Patrick McFadin
Patrick McFadin

Reputation: 1351

Triggers are run before anything you listed above. The intent is to capture a mutation before it is persisted in the database. This is to potentially enhance data as it is received. What you have outlined about could have some edge failure conditions with data indexed in ES and not persisted to the database.

Have you looked at the DataStax search product? It has a much deeper integration with Cassandra that avoids these problems.

Upvotes: 1

Related Questions