[ 
https://issues.apache.org/jira/browse/IGNITE-28727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18091703#comment-18091703
 ] 

Ignite TC Bot commented on IGNITE-28727:
----------------------------------------

{panel:title=Branch: [pull/13264/head] Base: [master] : Possible Blockers 
(1)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1}
{color:#d04437}Cache 4{color} [[tests 
1|https://ci2.ignite.apache.org/viewLog.html?buildId=9151803]]
* IgniteCacheTestSuite4: 
CacheEventWithTxLabelTest.testPassTxLabelInCashEventForAllCases - Test has low 
fail rate in base branch 0,0% and is not flaky

{panel}
{panel:title=Branch: [pull/13264/head] Base: [master] : New Tests 
(356)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#00008b}Cache 4{color} [[tests 
356|https://ci2.ignite.apache.org/viewLog.html?buildId=9151803]]
* {color:#013220}IgniteCacheTestSuite4: 
CacheVersionedEntryTransactionalLockTest.testVersionedEntryLockReturnsFalseWhenEntryIsLockedByAnotherTransaction[useNearCache=false,
 backups=0, replicated=false, batch=false] - PASSED{color}
* {color:#013220}IgniteCacheTestSuite4: 
CacheVersionedEntryTransactionalLockTest.testLockBeforePutRemoteKeyRepeatableReadTest[useNearCache=false,
 backups=0, replicated=false, batch=false] - PASSED{color}
* {color:#013220}IgniteCacheTestSuite4: 
CacheVersionedEntryTransactionalLockTest.testVersionedEntryLockReturnsFalseWhenLocalEntryIsLockedByAnotherTransactionAndCommit[useNearCache=false,
 backups=0, replicated=false, batch=false] - PASSED{color}
* {color:#013220}IgniteCacheTestSuite4: 
CacheVersionedEntryTransactionalLockTest.testVersionedEntryLockReturnsFalseWhenEntryIsLockedByAnotherTransactionNoWait[useNearCache=false,
 backups=0, replicated=false, batch=false] - PASSED{color}
* {color:#013220}IgniteCacheTestSuite4: 
CacheVersionedEntryTransactionalLockTest.testLockBeforePutRemoteKeyTest[useNearCache=false,
 backups=0, replicated=false, batch=false] - PASSED{color}
* {color:#013220}IgniteCacheTestSuite4: 
CacheVersionedEntryTransactionalLockTest.testLockBeforePutRemoteKeyTest[useNearCache=false,
 backups=0, replicated=false, batch=true] - PASSED{color}
* {color:#013220}IgniteCacheTestSuite4: 
CacheVersionedEntryTransactionalLockTest.testEntryVersionDoesNotChangeWhenEntryIsNotUpdated[useNearCache=false,
 backups=0, replicated=false, batch=false] - PASSED{color}
* {color:#013220}IgniteCacheTestSuite4: 
CacheVersionedEntryTransactionalLockTest.testLockBeforePutLocalKeyTest[useNearCache=false,
 backups=0, replicated=false, batch=false] - PASSED{color}
* {color:#013220}IgniteCacheTestSuite4: 
CacheVersionedEntryTransactionalLockTest.testLockBeforePutLocalKeyRepeatableReadTest[useNearCache=false,
 backups=0, replicated=false, batch=false] - PASSED{color}
* {color:#013220}IgniteCacheTestSuite4: 
CacheVersionedEntryTransactionalLockTest.testVersionedEntryLockCanBeRetriedAfterWaitTimeout[useNearCache=false,
 backups=0, replicated=false, batch=false] - PASSED{color}
* {color:#013220}IgniteCacheTestSuite4: 
CacheVersionedEntryTransactionalLockTest.testVersionedEntryLockReturnsFalseWhenEntryIsLockedByAnotherTransactionAndCommit[useNearCache=false,
 backups=0, replicated=false, batch=false] - PASSED{color}
... and 345 new tests

{panel}
[TeamCity *--> Run :: All* 
Results|https://ci2.ignite.apache.org/viewLog.html?buildId=9151635&buildTypeId=IgniteTests24Java8_RunAll]
{color:#ffffff}tcbot-analysis-comment chainBuildId=9151635 
rerunBuildIds=9151793,9151795,9151797,9151799,9151801,9151803{color}

> Create internal API method to lock cache entry with specific version
> --------------------------------------------------------------------
>
>                 Key: IGNITE-28727
>                 URL: https://issues.apache.org/jira/browse/IGNITE-28727
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Vladislav Pyatkov
>            Assignee: Vladislav Pyatkov
>            Priority: Major
>              Labels: ignite-2
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> h3. Motivation
> In some cases we want to have a guarantee that no other operation splits 
> between a read and an update. This case is rather more interesting for SQL 
> than the cache API, where the key is always known.
> Proposed API:
> {code:java|title=IgniteInternalCache.java}
> /**
>  * Acquires transactional lock for a cached object represented by the given 
> entry only if a current entry version
>  * is equal to the entry version. This method works only in {@link 
> TransactionConcurrency#PESSIMISTIC} transaction.
>  *
>  * @param entry Entry whose key, value and version should be used.
>  * @param waitTimeout Timeout in milliseconds to wait for lock to be acquired
>  *      ({@code '0'} for no expiration), {@code -1} for immediate failure if
>  *      lock cannot be acquired immediately).
>  * @return {@code True} if lock was acquired with the same entry version.
>  * @throws IgniteCheckedException If lock acquisition resulted in an error.
>  */
> public boolean lockTxEntry(CacheEntry<K, V> entry, long waitTimeout) throws 
> IgniteCheckedException;
> /**
>  * Acquires transactional locks for cached objects represented by the given 
> entries only if current entry versions
>  * are equal to entry versions. This method works only in {@link 
> TransactionConcurrency#PESSIMISTIC} transaction.
>  *
>  * @param entries Entries whose keys, values and versions should be used.
>  * @param waitTimeout Timeout in milliseconds to wait for locks to be acquired
>  *      ({@code '0'} for no expiration), {@code -1} for immediate failure if
>  *      locks cannot be acquired immediately).
>  * @return {@code True} if all locks were acquired with the same entry 
> versions.
>  * @throws IgniteCheckedException If lock acquisition resulted in an error.
>  */
> public boolean lockTxEntries(Collection<CacheEntry<K, V>> entries, long 
> waitTimeout) throws IgniteCheckedException;
> /**
>  * Asynchronously transactional lock for a cached object represented by the 
> given entry only if a current entry
>  * version is equal to the entry version. This method works only in
>  * {@link TransactionConcurrency#PESSIMISTIC} transaction.
>  *
>  * @param entry Entry whose key, value and version should be used.
>  * @param waitTimeout Timeout in milliseconds to wait for lock to be acquired
>  *      ({@code '0'} for no expiration), {@code -1} for immediate failure if
>  *      lock cannot be acquired immediately).
>  * @return {@code True} if lock was acquired with the same entry version.
>  * @throws IgniteCheckedException If lock acquisition resulted in an error.
>  */
> public IgniteInternalFuture<Boolean> lockTxEntryAsync(CacheEntry<K, V> entry, 
> long waitTimeout);
> /**
>  * Asynchronously acquires transactional locks for cached objects represented 
> by the given entries only if current
>  * entry versions are equal to entry versions. This method works only in
>  * {@link TransactionConcurrency#PESSIMISTIC} transaction.
>  *
>  * @param entries Entries whose keys, values and versions should be used.
>  * @param waitTimeout Timeout in milliseconds to wait for locks to be acquired
>  *      ({@code '0'} for no expiration), {@code -1} for immediate failure if
>  *      locks cannot be acquired immediately).
>  * @return {@code True} if all locks were acquired with the same entry 
> versions.
>  * @throws IgniteCheckedException If lock acquisition resulted in an error.
>  */
> public IgniteInternalFuture<Boolean> 
> lockTxEntriesAsync(Collection<CacheEntry<K, V>> entries, long 
> waitTimeout);{code}
> h3. Definition of done
> The method is added
> All guarantees are satisfied and confirmed by a bunch of tests.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to