geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Shu (JIRA)" <>
Subject [jira] [Commented] (GEODE-2349) Region.values() doesn't work properly inside JTA
Date Thu, 02 Nov 2017 20:25:00 GMT


Eric Shu commented on GEODE-2349:

This is fixed now (as of Geode 1.4.0) by making region set operation transactional even if
it is the first operation. See GEODE-3521.

> Region.values() doesn't work properly inside JTA
> ------------------------------------------------
>                 Key: GEODE-2349
>                 URL:
>             Project: Geode
>          Issue Type: Bug
>          Components: transactions
>            Reporter: Vadim Lotarev
>            Assignee: Eric Shu
>            Priority: Major
> I experienced rather strange error invoking Region.values() within JTA transaction: {{java.lang.IllegalStateException:
The Region collection is not transactional but is being used in a transaction}}.
> Doing some investigation I think I understand what is the cause of this error. Everything
works if {{Region.values()}} invoked alone in transaction but failed if you invoke, say, {{get()}}
on another (or the same) region before starting iteration over the collection returned by
{{values()}}. I think that the reason of this error is the absence of {{discoverJTA()}} in
{{values()}} method. So, when {{values()}} invoked first time {{EntriesSet}} is created with
{{myTX = null}} since no transaction is determined (as soon as {{discoverJTA()}} is not invoked).
If you are iterating immediately everything works as soon as there are no transaction on a
region still ({{EntriesSet.myTx = null && topRegion.isTX() = false}}). But as soon
as you invoke {{get()}} (or any other method where {{discoverJTA()}} is invoked) than all
regions became transactional and next execution of {{EntriesSet.iterator()}} failed ({{EntriesSet.myTx
= null && topRegion.isTX() = true}}).

This message was sent by Atlassian JIRA

View raw message