You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Christopher Tenter (Jira)" <ji...@apache.org> on 2023/02/06 14:10:00 UTC
[jira] [Created] (IGNITE-18722) C++ thin: inconsistent state SQL and direct KV api during tx
Christopher Tenter created IGNITE-18722:
-------------------------------------------
Summary: C++ thin: inconsistent state SQL and direct KV api during tx
Key: IGNITE-18722
URL: https://issues.apache.org/jira/browse/IGNITE-18722
Project: Ignite
Issue Type: Bug
Components: sql, thin client
Affects Versions: 2.14
Environment: Windows 10 x64
ignite 2.14.0
Reporter: Christopher Tenter
My cache config looks like this:
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<!-- Set a cache name. -->
<property name="name" value="G3PrototypeChartLib"/>
<!-- Set cache mode. -->
<property name="cacheMode" value="REPLICATED"/>
<!-- Enable Transactions. -->
<property name="atomicityMode" value="TRANSACTIONAL"/>
<!-- Other cache configurations. -->
<property name="queryEntities">
<list>
<bean class="org.apache.ignite.cache.QueryEntity">
<property name="keyType" value="java.lang.String"/>
<property name="valueType" value="G3::VirtualFile"/>
<property name="tableName" value="vfs"/>
<property name="keyFieldName" value="virtualName"/>
<property name="fields">
<map>
<entry key="virtualName" value="java.lang.String"/>
<entry key="physicalName" value="java.lang.String"/>
<entry key="revId" value="java.lang.UUID"/>
<entry key="deleted" value="java.lang.Boolean"/>
</map>
</property>
</bean>
</list>
</property>
</bean>
# create cache
# start a tx on it
# write key-value pairs with the key-value api
# use sql query to read these pairs
The SQL queries cannot see the key-value pairs for as long as the transaction is open. After commit they become visible in SQL. It is problematic because I rely on the SQL query to iterate through the KV pairs, as there seems to be no other way to iterate a cache. This way I have to do additional bookkeeping of which pairs have changed in the tx and fix the SQL query results when a tx is running.
Is this a cache config issue or intended behavior? A way to iterate the cache items in the key-value API would be appreciated too.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)