Hello Pieter!!,

By default, Geode does not allow transactions on persistent regions, this
is why you're getting the exception in the first place. You can enable the
use of transactions on persistent regions by setting the property
*gemfire.ALLOW_PERSISTENT_TRANSACTIONS* to *true*, anyway. Keep in mind,
however, that Geode does not provide atomic disk persistence guarantees,
that's why the default behavior is to disallow disk-persistent regions from
participating in transactions.
For more details about this, please have a look at Transactions and
Persistent Regions [1] within the user guide.
Hope this helps, cheers.

[1]:
https://geode.apache.org/docs/guide/14/developing/transactions/cache_transactions_by_region_type.html

On Wed, Feb 7, 2018 at 6:54 AM, Pieter van Zyl <[email protected]>
wrote:

> Good day.
>
> We have added transactions using Geode and are now getting this exception
> as soon as we try and lookup something from a region:
>
> rg.apache.geode.cache.client.ServerOperationException: remote server on
> rfc(5196:loner):60112:c13ffd6e: While performing a remote get
>
> at org.apache.geode.cache.client.internal.AbstractOp.
> processObjResponse(AbstractOp.java:295)
> at org.apache.geode.cache.client.internal.GetOp$GetOpImpl.
> processResponse(GetOp.java:143)
> at org.apache.geode.cache.client.internal.AbstractOp.attemptReadResponse(
> AbstractOp.java:213)
> at org.apache.geode.cache.client.internal.AbstractOp.attempt(
> AbstractOp.java:392)
> at org.apache.geode.cache.client.internal.ConnectionImpl.
> execute(ConnectionImpl.java:280)
> at org.apache.geode.cache.client.internal.pooling.
> PooledConnection.execute(PooledConnection.java:332)
> at org.apache.geode.cache.client.internal.OpExecutorImpl.
> executeWithPossibleReAuthentication(OpExecutorImpl
>
> *Caused by: java.lang.UnsupportedOperationException: Operations on
> persist-backup regions are not allowed because this thread has an active
> transaction*
> at org.apache.geode.internal.cache.TXRegionState.<init>(
> TXRegionState.java:61)
>
> We get this error when trying to access the RootMapHolder region setup
> below.
>
> We have a client connecting to a server. The relevant client config is
> basically:
>
> <bean id="pdxSerializer" class="org.rdb.session.geode.RDBGeodeSerializer">
>     <constructor-arg value="org.rdb.*,net.lautus.*"/>
> </bean>
>
>
> <util:properties id="gemfire-props">
>     <prop key="log-level">config</prop>
> </util:properties>
>
> <gfe:client-cache properties-ref="gemfire-props" pdx-serializer-ref="
> pdxSerializer"/>
> <gfe:transaction-manager copy-on-read="true"/>
>
>
> <gfe:pool>
>     <gfe:server host="localhost" port="40407"/>
> </gfe:pool>
>
>
> <gfe:client-region id="org.rdb.internal.session.rootmap.RootMapHolder"
> shortcut="CACHING_PROXY_OVERFLOW"
>                    ignore-if-exists="true"/>
>
>
>
> On the server we have this config part:
>
> util:properties id="gemfire-props">
>     <prop key="log-level">info</prop>
>     <prop key="mcast-port">0</prop>
>
>
> </util:properties>
>
>
> <gfe:cache properties-ref="gemfire-props" pdx-serializer-ref="pdxSerializer"
> pdx-persistent="true"
>            pdx-disk-store="pdx-disk-store" />
>
>
> <gfe:cache-server auto-startup="true" bind-address="localhost"
> port="40407" host-name-for-clients="localhost"
>                   max-connections="1"/>
>
> <bean id="pdxSerializer" class="org.rdb.session.geode.RDBGeodeSerializer">
>     <constructor-arg value="org.rdb.*,net.lautus.*"/>
> </bean>
>
> <gfe:replicated-region id="org.rdb.internal.session.rootmap.RootMapHolder"
>                        disk-store-ref="testDiskStore"
>                        persistent="true">
>     <!--<gfe:cache-listener ref="cacheListener"/>-->
>     <gfe:eviction type="HEAP_PERCENTAGE" action="OVERFLOW_TO_DISK"/>
> </gfe:replicated-region>
>
>
> <gfe:disk-store id="testDiskStore">
>     <gfe:disk-dir location="geode-test/testDiskStore"/>
> </gfe:disk-store>
>
>
> <gfe:disk-store id="pdx-disk-store">
>     <gfe:disk-dir location="geode-test/pdx"/>
> </gfe:disk-store>
>
>
> We are getting and starting transactions via:
>
> transactionManager = context.getBean("gemfireTransactionManager",
> GemfireTransactionManager.class);
>
> cacheTransactionManager = transactionManager.getCache().
> getCacheTransactionManager();
>
> cacheTransactionManager.begin();
>
> By debugging I can see we start only one transaction. But as soon as we
> access the first Region it throws this error.
>
> We are not using annotations and Spring repositories as we are trying to
> add Geode to an existing project that has no Spring, Spring Data or JPA
> support.
>
> Are we using transactions incorrectly? Or is this a Region setup issue?
>
> Any help would be appreciated. Can provide more detail if required.
>
>
> Kindly
>
> Pieter
>



-- 
Juan José Ramos Cassella
Senior Technical Support Engineer
Email: [email protected]
Office#: +353 21 4238611
Mobile#: +353 87 2074066
After Hours Contact#: +1 877 477 2269
Office Hours: Mon - Thu 08:30 - 17:00 GMT. Fri 08:30 - 16:00 GMT
How to upload artifacts:
https://support.pivotal.io/hc/en-us/articles/204369073
How to escalate a ticket:
https://support.pivotal.io/hc/en-us/articles/203809556

[image: support] <https://support.pivotal.io/> [image: twitter]
<https://twitter.com/pivotal> [image: linkedin]
<https://www.linkedin.com/company/3048967> [image: facebook]
<https://www.facebook.com/pivotalsoftware> [image: google plus]
<https://plus.google.com/+Pivotal> [image: youtube]
<https://www.youtube.com/playlist?list=PLAdzTan_eSPScpj2J50ErtzR9ANSzv3kl>

Reply via email to