[
https://issues.apache.org/jira/browse/IGNITE-19169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kirill Tkalenko updated IGNITE-19169:
-------------------------------------
Description:
h2. *Update:*
For now, a possible deadlock fo *MvPartitionStorage#pollForVacuum* inside
*MvPartitionStorage#runConsistently* is fine, because we need to maintain
consistency when working with indexes.
It is enough for us to fix *StorageUpdateHandler#executeBatchGc* so that it
runs outside the general *MvPartitionStorage#runConsistently* and each
*StorageUpdateHandler#internalVacuum* is in its own
*MvPartitionStorage#runConsistently*.
h2. *Problem:*
Deadlock detected while calling
*org.apache.ignite.internal.storage.MvPartitionStorage#pollForVacuum*,
reproducer:
{code:java}
@Test
public void testDeadLock() {
RowId rowId2 = new RowId(PARTITION_ID);
for (int i = 0; i < REPEATS; i++) {
addWriteCommitted(ROW_ID, TABLE_ROW, clock.now());
addWriteCommitted(rowId2, TABLE_ROW2, clock.now());
addWriteCommitted(ROW_ID, TABLE_ROW, clock.now());
addWriteCommitted(rowId2, TABLE_ROW2, clock.now());
addWriteCommitted(ROW_ID, null, clock.now());
addWriteCommitted(rowId2, null, clock.now());
RunnableX remove2rowsAction = () -> {
storage.runConsistently(() -> {
storage.pollForVacuum(HybridTimestamp.MAX_VALUE);
storage.pollForVacuum(HybridTimestamp.MAX_VALUE);
return null;
});
};
runRace(remove2rowsAction, remove2rowsAction);
assertNull(storage.closestRowId(RowId.lowestRowId(PARTITION_ID)));
}
}
{code}
was:
h2. *Update:*
For now, a possible deadlock fo *MvPartitionStorage#pollForVacuum* inside
*MvPartitionStorage#runConsistently* is fine, because we need to maintain
consistency when working with indexes.
It is enough for us to fix *StorageUpdateHandler#executeBatchGc* so that it
runs outside the general *MvPartitionStorage#runConsistently* and each
*StorageUpdateHandler#internalVacuum* is in its own
*MvPartitionStorage#runConsistently*.
Deadlock detected while calling
*org.apache.ignite.internal.storage.MvPartitionStorage#pollForVacuum*,
reproducer:
{code:java}
@Test
public void testDeadLock() {
RowId rowId2 = new RowId(PARTITION_ID);
for (int i = 0; i < REPEATS; i++) {
addWriteCommitted(ROW_ID, TABLE_ROW, clock.now());
addWriteCommitted(rowId2, TABLE_ROW2, clock.now());
addWriteCommitted(ROW_ID, TABLE_ROW, clock.now());
addWriteCommitted(rowId2, TABLE_ROW2, clock.now());
addWriteCommitted(ROW_ID, null, clock.now());
addWriteCommitted(rowId2, null, clock.now());
RunnableX remove2rowsAction = () -> {
storage.runConsistently(() -> {
storage.pollForVacuum(HybridTimestamp.MAX_VALUE);
storage.pollForVacuum(HybridTimestamp.MAX_VALUE);
return null;
});
};
runRace(remove2rowsAction, remove2rowsAction);
assertNull(storage.closestRowId(RowId.lowestRowId(PARTITION_ID)));
}
}
{code}
> Deadlock detected while calling MvPartitionStorage#pollForVacuum
> ----------------------------------------------------------------
>
> Key: IGNITE-19169
> URL: https://issues.apache.org/jira/browse/IGNITE-19169
> Project: Ignite
> Issue Type: Bug
> Affects Versions: 3.0.0-beta2
> Reporter: Kirill Tkalenko
> Assignee: Kirill Tkalenko
> Priority: Major
> Labels: ignite-3
> Fix For: 3.0.0-beta2
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> h2. *Update:*
> For now, a possible deadlock fo *MvPartitionStorage#pollForVacuum* inside
> *MvPartitionStorage#runConsistently* is fine, because we need to maintain
> consistency when working with indexes.
> It is enough for us to fix *StorageUpdateHandler#executeBatchGc* so that it
> runs outside the general *MvPartitionStorage#runConsistently* and each
> *StorageUpdateHandler#internalVacuum* is in its own
> *MvPartitionStorage#runConsistently*.
> h2. *Problem:*
> Deadlock detected while calling
> *org.apache.ignite.internal.storage.MvPartitionStorage#pollForVacuum*,
> reproducer:
> {code:java}
> @Test
> public void testDeadLock() {
> RowId rowId2 = new RowId(PARTITION_ID);
> for (int i = 0; i < REPEATS; i++) {
> addWriteCommitted(ROW_ID, TABLE_ROW, clock.now());
> addWriteCommitted(rowId2, TABLE_ROW2, clock.now());
> addWriteCommitted(ROW_ID, TABLE_ROW, clock.now());
> addWriteCommitted(rowId2, TABLE_ROW2, clock.now());
> addWriteCommitted(ROW_ID, null, clock.now());
> addWriteCommitted(rowId2, null, clock.now());
> RunnableX remove2rowsAction = () -> {
> storage.runConsistently(() -> {
> storage.pollForVacuum(HybridTimestamp.MAX_VALUE);
> storage.pollForVacuum(HybridTimestamp.MAX_VALUE);
> return null;
> });
> };
> runRace(remove2rowsAction, remove2rowsAction);
> assertNull(storage.closestRowId(RowId.lowestRowId(PARTITION_ID)));
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)