Skip to content

Commit

Permalink
IGNITE-10764: MVCC: Transactions failed to acquire lock within timeou…
Browse files Browse the repository at this point in the history
…t. This closes #5910.

Signed-off-by: rkondakov <kondakov87@mail.ru>
  • Loading branch information
pavlukhin authored and gvvinblade committed Jan 29, 2019
1 parent 625f917 commit c30a467
Showing 1 changed file with 4 additions and 5 deletions.
Expand Up @@ -1132,7 +1132,7 @@ public void testQueryUpdateSubqueryImplicit() throws Exception {
Ignite checkNode = grid(rnd.nextInt(4));
Ignite updateNode = grid(rnd.nextInt(4));

IgniteCache cache = checkNode.cache(DEFAULT_CACHE_NAME);
IgniteCache<Object, Object> cache = checkNode.cache(DEFAULT_CACHE_NAME);

cache.putAll(F.asMap(
1, new MvccTestSqlIndexValue(1),
Expand All @@ -1157,9 +1157,9 @@ public void testQueryUpdateSubqueryImplicit() throws Exception {
/**
* @throws Exception If failed.
*/
@Ignore("https://issues.apache.org/jira/browse/IGNITE-10764")
@Test
public void testQueryInsertMultithread() throws Exception {
// Reopen https://issues.apache.org/jira/browse/IGNITE-10764 if test starts failing with timeout
final int THREAD_CNT = 8;
final int BATCH_SIZE = 1000;
final int ROUNDS = 10;
Expand Down Expand Up @@ -1199,11 +1199,10 @@ public void testQueryInsertMultithread() throws Exception {
Ignite checkNode = grid(rnd.nextInt(4));
Ignite updateNode = grid(rnd.nextInt(4));

IgniteCache cache = checkNode.cache(DEFAULT_CACHE_NAME);
IgniteCache<Object, Object> cache = checkNode.cache(DEFAULT_CACHE_NAME);

// no tx timeout here, deadlocks should not happen because all keys are unique
try (Transaction tx = updateNode.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
tx.timeout(TX_TIMEOUT);

SqlFieldsQuery qry = new SqlFieldsQuery(bldr.toString()).setPageSize(100);

IgniteCache<Object, Object> cache0 = updateNode.cache(DEFAULT_CACHE_NAME);
Expand Down

0 comments on commit c30a467

Please sign in to comment.