[ https://issues.apache.org/jira/browse/IGNITE-25443?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vyacheslav Koptilin updated IGNITE-25443: ----------------------------------------- Epic Link: IGNITE-22115 > TableManager.tablesPerZoneLocks might not released due to an exception > ---------------------------------------------------------------------- > > Key: IGNITE-25443 > URL: https://issues.apache.org/jira/browse/IGNITE-25443 > Project: Ignite > Issue Type: Bug > Reporter: Vyacheslav Koptilin > Assignee: Vyacheslav Koptilin > Priority: Major > Labels: ignite-3 > Time Spent: 10m > Remaining Estimate: 0h > > The following code might lead to the fact that a lock will not be released: > {code:java|title=TabaleManager#beforeZoneReplicaStartedImpl} > CompletableFuture<Long> readLockAcquisitionFuture = zoneLock.readLock(); > try { > return readLockAcquisitionFuture.thenCompose(stamp -> { > ... > return allOf(futures).whenComplete((unused, t) -> > zoneLock.unlockRead(stamp)); > }); > } catch (Throwable t) { > readLockAcquisitionFuture.whenComplete((stamp, ex) -> > zoneLock.unlockRead(stamp)); > return failedFuture(t); > } > {code} > If an exception is thrown inside `thenCompose`, the lock will not be released. -- This message was sent by Atlassian Jira (v8.20.10#820010)