Commit / Rollback support

Heya,

Is it planned (or best, is it already exist) to have a support for
transactions in ES ?

What I would like to achieve is to make my ES insert/update be part of a
transaction.

Something like :

Try {

BeginTransaction()

Update my postgresql database

Send data to a JMS Queue

Push a document in ES

commitTransaction()

} catch (Exception) {

rollbackTransaction()

}

So, the commitTransaction() could call for example client.commit() and the
rollbackTransaction could call something like client.rollback().

I don't know if it make sense.

The only way I found to support that on my side is to :

Get the latest version of my ES doc aka previousDoc

Push my new version of my es doc aka newDoc

In commitTransaction(), do nothing

In rollbackTransaction(), if previousDoc == null, client.delete(newDoc) else
client.push(previousDoc)

Thanks for your feedback

David.

No, its not planned and I don't see ES supporting it in the future.

On Friday, February 24, 2012 at 10:53 PM, David Pilato wrote:

Heya,

Is it planned (or best, is it already exist) to have a support for transactions in ES ?

What I would like to achieve is to make my ES insert/update be part of a transaction.

Something like :

Try {

BeginTransaction()

Update my postgresql database

Send data to a JMS Queue

Push a document in ES

commitTransaction()

} catch (Exception) {

rollbackTransaction()

}

So, the commitTransaction() could call for example client.commit() and the rollbackTransaction could call something like client.rollback().

I don’t know if it make sense.

The only way I found to support that on my side is to :

Get the latest version of my ES doc aka previousDoc

Push my new version of my es doc aka newDoc

In commitTransaction(), do nothing

In rollbackTransaction(), if previousDoc == null, client.delete(newDoc) else client.push(previousDoc)

Thanks for your feedback

David.