You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Дмитрий Рябов <so...@gmail.com> on 2017/04/03 12:37:37 UTC

IGNITE-4188: Savepoints support inside of Ignite Transactions, thoughts about realisation

Hello, community. Sam, Yakov, Alex G., can you look my decision?

try (Transaction tx = ignite.transactions().txStart()) {
    c.put(1, 1);

    tx.savepoint("mysavepoint");

    c.put(2, 2);

    tx.rollbackToSavepoint("mysavepoint");

    c.put(3, 3);

    tx.commit();
}


I want to make it in such way:

When user calls tx.savepoint(""), Transaction delegate call to
IgniteInternalTx, which delegate it to its IgniteTxState.

IgniteTxState implementation will contain stack of savepoints, where
Savepoint is class containing snapshot of cache entries and any important
additional information.

What do you think?