[
https://issues.apache.org/jira/browse/IGNITE-17811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vyacheslav Koptilin updated IGNITE-17811:
-----------------------------------------
Labels: ignite-3 (was: )
> Implement efficient way to retrieve locks by txId
> -------------------------------------------------
>
> Key: IGNITE-17811
> URL: https://issues.apache.org/jira/browse/IGNITE-17811
> Project: Ignite
> Issue Type: Improvement
> Reporter: Alexander Lapin
> Priority: Major
> Labels: ignite-3
>
> org.apache.ignite.internal.tx.impl.HeapLockManager#locks require better
> implementation that'll use index or similar instead of full locks set
> iteration.
> {code:java}
> public Iterator<Lock> locks(UUID txId) {
> // TODO: tmp, use index instead.
> List<Lock> result = new ArrayList<>();
> for (Map.Entry<LockKey, LockState> entry : locks.entrySet()) {
> Waiter waiter = entry.getValue().waiter(txId);
> if (waiter != null) {
> result.add(
> new Lock(
> entry.getKey(),
> waiter.lockMode(),
> txId
> )
> );
> }
> }
> return result.iterator();
> }{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)