[
https://issues.apache.org/jira/browse/IGNITE-23110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17903562#comment-17903562
]
Ignite TC Bot commented on IGNITE-23110:
----------------------------------------
{panel:title=Branch: [pull/11559/head] Base: [master] : No blockers
found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
{panel:title=Branch: [pull/11559/head] Base: [master] : New Tests
(3)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#00008b}Thin Client: Java{color} [[tests
1|https://ci2.ignite.apache.org/viewLog.html?buildId=8199201]]
* {color:#013220}ClientTestSuite:
ThinClientNonTransactionalOperationsInTxTest.testThinClientCacheClear -
PASSED{color}
{color:#00008b}Basic 4{color} [[tests
2|https://ci2.ignite.apache.org/viewLog.html?buildId=8199112]]
* {color:#013220}IgniteBasicTestSuite2:
NonTransactionalOperationsInTxTest.testIgniteCacheClearOnClientNode -
PASSED{color}
* {color:#013220}IgniteBasicTestSuite2:
NonTransactionalOperationsInTxTest.testIgniteCacheClear - PASSED{color}
{panel}
[TeamCity *--> Run :: All*
Results|https://ci2.ignite.apache.org/viewLog.html?buildId=8199224&buildTypeId=IgniteTests24Java8_RunAll]
> Disallow IgniteCache#clear inside transaction
> ---------------------------------------------
>
> Key: IGNITE-23110
> URL: https://issues.apache.org/jira/browse/IGNITE-23110
> Project: Ignite
> Issue Type: Improvement
> Reporter: Nikolay Izhikov
> Assignee: Julia Bakulina
> Priority: Major
> Labels: ise
> Fix For: 2.17
>
> Time Spent: 2h
> Remaining Estimate: 0h
>
> `IgniteCache#clear` invocation are not transactional.
> But, currently, Ignite allow to invoke `clear` inside transaction.
> This lead to unexpected behavior and hides business logic errors.
> We must disallow IgniteCache#clear call inside transaction.
> {code:java}
> /** */
> @Test
> public void testClearInTransction() {
> IgniteCache<Object, Object> cache = client.createCache(new
> CacheConfiguration<>("my-cache").setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL));
> cache.put(1, 1);
> try (Transaction tx =
> client.transactions().txStart(TransactionConcurrency.PESSIMISTIC,
> TransactionIsolation.READ_COMMITTED)) {
> cache.put(2, 2);
> cache.clear();
> tx.commit();
> }
> assertFalse(cache.containsKey(1));
> assertTrue(cache.containsKey(2));
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)