You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Sergey Chugunov (Jira)" <ji...@apache.org> on 2021/07/19 14:18:00 UTC

[jira] [Created] (IGNITE-15147) Possible leak in metrics in PageLockTracker

Sergey Chugunov created IGNITE-15147:
----------------------------------------

             Summary: 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
             Fix For: 2.12


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 (this call has a side effect of incrementing lock's metrics). But if returned pageAddr is zero (lock acquisition has failed) we return from the method without entering try block. As a result, readUnlock method is not called, the metrics are not decremented back.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)