ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitriy Setrakyan <dsetrak...@apache.org>
Subject Re: IGNITE-4188, savepoints with atomic cache?
Date Tue, 28 Mar 2017 18:51:13 GMT
On Tue, Mar 28, 2017 at 11:42 AM, Valentin Kulichenko <
valentin.kulichenko@gmail.com> wrote:

> Dmitry,
>
> Transaction is not started on a particular cache, it's separate top-level
> API. You can then include operations on different caches, like this:
>
> try (Transaction tx = ignite.transactions.txStart()) {
>     cache1.put(..);
>     cache2.put(..);
>     cache3.put(..);
>
>     tx.commit();
> }
>
> In the code above it's easy to think that all three operations are enlisted
> in transaction, but if one of the caches happens to be atomic (due to
> misconfiguration, for example), that's actually not true. And we don't even
> warn user about this.
>

Got it.

But what if a user really needs to update an atomic cache from within some
transactional logic? I think we should allow it, but print out an warning
to the log on per-cache basis the first time we see some atomic cache used
from within a transaction.

D.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message