[ 
https://issues.apache.org/jira/browse/IGNITE-17635?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Plekhanov updated IGNITE-17635:
---------------------------------------
    Description: 
Reproducer:
{code:java}
@Test
public void testLockIsHeldByThreadAfterTimeout() throws Exception {
    IgniteEx ignite = startGrid();

    ignite.cluster().state(ClusterState.ACTIVE);

    GridCacheDatabaseSharedManager db = dbMgr(ignite);

    CountDownLatch latch = new CountDownLatch(1);

    db.addCheckpointListener(new CheckpointListener() {
        @Override public void onMarkCheckpointBegin(Context ctx) {
            latch.countDown();

            doSleep(200L);
        }

        @Override public void onCheckpointBegin(Context ctx) {
            // No-op.
        }

        @Override public void beforeCheckpointBegin(Context ctx) {
            // No-op.
        }
    });

    db.forceCheckpoint("lock");

    latch.await(getTestTimeout(), TimeUnit.MILLISECONDS);

    db.checkpointReadLockTimeout(10L);
    db.checkpointReadLock();
    db.checkpointReadUnlock();
    assertFalse(db.checkpointLockIsHeldByThread());
} {code}
After such situation there are some assertions possible, which cause node to 
shutdown by failure handler:
{noformat}
java.lang.AssertionError: Resolving a task name should not be executed under 
the checkpoint lock.
    at 
org.apache.ignite.internal.processors.task.GridTaskProcessor.resolveTaskName(GridTaskProcessor.java:524)
    at 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtGetSingleFuture.getAsync(GridDhtGetSingleFuture.java:337)
{noformat}
 

  was:
Reproducer:

 
{code:java}
@Test
public void testLockIsHeldByThreadAfterTimeout() throws Exception {
    IgniteEx ignite = startGrid();

    ignite.cluster().state(ClusterState.ACTIVE);

    GridCacheDatabaseSharedManager db = dbMgr(ignite);

    CountDownLatch latch = new CountDownLatch(1);

    db.addCheckpointListener(new CheckpointListener() {
        @Override public void onMarkCheckpointBegin(Context ctx) {
            latch.countDown();

            doSleep(200L);
        }

        @Override public void onCheckpointBegin(Context ctx) {
            // No-op.
        }

        @Override public void beforeCheckpointBegin(Context ctx) {
            // No-op.
        }
    });

    db.forceCheckpoint("lock");

    latch.await(getTestTimeout(), TimeUnit.MILLISECONDS);

    db.checkpointReadLockTimeout(10L);
    db.checkpointReadLock();
    db.checkpointReadUnlock();
    assertFalse(db.checkpointLockIsHeldByThread());
} {code}
After such situation there are some assertions possible, which cause node to 
shutdown by failure handler:
{noformat}
java.lang.AssertionError: Resolving a task name should not be executed under 
the checkpoint lock.
    at 
org.apache.ignite.internal.processors.task.GridTaskProcessor.resolveTaskName(GridTaskProcessor.java:524)
    at 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtGetSingleFuture.getAsync(GridDhtGetSingleFuture.java:337)
{noformat}
 


> Checkpoint lock wrongly return true for checkpointLockIsHeldByThread after 
> read lock timeout
> --------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-17635
>                 URL: https://issues.apache.org/jira/browse/IGNITE-17635
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Aleksey Plekhanov
>            Assignee: Aleksey Plekhanov
>            Priority: Major
>
> Reproducer:
> {code:java}
> @Test
> public void testLockIsHeldByThreadAfterTimeout() throws Exception {
>     IgniteEx ignite = startGrid();
>     ignite.cluster().state(ClusterState.ACTIVE);
>     GridCacheDatabaseSharedManager db = dbMgr(ignite);
>     CountDownLatch latch = new CountDownLatch(1);
>     db.addCheckpointListener(new CheckpointListener() {
>         @Override public void onMarkCheckpointBegin(Context ctx) {
>             latch.countDown();
>             doSleep(200L);
>         }
>         @Override public void onCheckpointBegin(Context ctx) {
>             // No-op.
>         }
>         @Override public void beforeCheckpointBegin(Context ctx) {
>             // No-op.
>         }
>     });
>     db.forceCheckpoint("lock");
>     latch.await(getTestTimeout(), TimeUnit.MILLISECONDS);
>     db.checkpointReadLockTimeout(10L);
>     db.checkpointReadLock();
>     db.checkpointReadUnlock();
>     assertFalse(db.checkpointLockIsHeldByThread());
> } {code}
> After such situation there are some assertions possible, which cause node to 
> shutdown by failure handler:
> {noformat}
> java.lang.AssertionError: Resolving a task name should not be executed under 
> the checkpoint lock.
>     at 
> org.apache.ignite.internal.processors.task.GridTaskProcessor.resolveTaskName(GridTaskProcessor.java:524)
>     at 
> org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtGetSingleFuture.getAsync(GridDhtGetSingleFuture.java:337)
> {noformat}
>  



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

Reply via email to