Rollback? ES 6?

I read that ElasticSearch may never support rollback even though it has a tranlog. Why?

There are some interesting use cases when using:

begin_tran()
bunch of updates/inserts and possible rollback()
commit_tran()

You can "simulate" such a behavior using a transactional queue system (ActiveMQ for example IIRC) and just read the commited queue to create a bulk and index in elasticsearch.

My 2 cents

While "translog" seems to resemble to a "transaction log" of the database theory world, the concept in ES is a bit different.

The translog is just a local write-ahead log file for the process of transmitting data from operation commands to disk. Like a metadata journal in a file system, it provides atomicity and durability, not all four properties of ACID. A single translog for a shard alone does not provide checkpoints for coordinated index-wide rollback. And in a distributed system, you have to provide also solutions for more complex situations, the challenges are described by the CAP theorem. This is where ES 6 sequence IDs will be an interesting topic, they can save a lot of work when shards must be recovered globally.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.