[
https://issues.apache.org/jira/browse/IGNITE-15147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Taras Ledkov updated IGNITE-15147:
----------------------------------
Fix Version/s: 2.15
(was: 2.14)
> Possible leak in metrics in PageLockTracker
> -------------------------------------------
>
> Key: IGNITE-15147
> URL: https://issues.apache.org/jira/browse/IGNITE-15147
> Project: Ignite
> Issue Type: Bug
> Components: persistence
> Affects Versions: 2.10
> Reporter: Sergey Chugunov
> Priority: Major
> Fix For: 2.15
>
>
> In one of PageHandler#readPage methods there is the following code:
> {code:java}
> long pageAddr = readLock(pageMem, cacheId, pageId, page, lsnr);
> if (pageAddr == 0L)
> return lockFailed;
> try {
> PageIO io = pageIoRslvr.resolve(pageAddr);
> return h.run(cacheId, pageId, page, pageAddr, io, null, arg, intArg,
> statHolder);
> }
> finally {
> readUnlock(pageMem, cacheId, pageId, page, pageAddr, lsnr);
> }
> {code}
> Here we obtain a read lock on a page by calling {{readLock}} method, its
> implementation is as following:
> {code:java}
> lsnr.onBeforeReadLock(cacheId, pageId, page);
> long pageAddr = pageMem.readLock(cacheId, pageId, page);
> lsnr.onReadLock(cacheId, pageId, page, pageAddr);
> return pageAddr;
> {code}
> And here is a problem: in {{readLock}} we always call {{onReadLock}} for the
> page but {{onReadUnlock}} is called *only if lock was acquired successfully*.
> Otherwise lock counters end up in incorrect state: {{onReadLock}} called
> although no lock was actually acqured.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)