jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chetan Mehrotra (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-3103) Stale document in MongoDocumentStore cache
Date Mon, 20 Jul 2015 09:53:04 GMT

    [ https://issues.apache.org/jira/browse/OAK-3103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14633245#comment-14633245

Chetan Mehrotra commented on OAK-3103:

After offline discussion with Marcel got better understanding of the fix. So +1

For my memory - Key change here is that with new logic call to {{addToCache}} is not performed
in {{update}} flow. {{addToCache}} is susceptible to potential race condition (which Marcel
explained above) and is only safe to be called in case of new document insert as it does not
check for modCount constrained when inserting an entry to the cache and further does the operation
without holding any lock. With fix the call would end up in {{updateCache}} method which only
updates the cache if any only if modCount matches!

> Stale document in MongoDocumentStore cache
> ------------------------------------------
>                 Key: OAK-3103
>                 URL: https://issues.apache.org/jira/browse/OAK-3103
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core, mongomk
>    Affects Versions: 1.2.2, 1.3.2, 1.0.17
>            Reporter: Marcel Reutegger
>            Assignee: Marcel Reutegger
> In some rare cases it may happen that a stale document is put into the MongoDocumentStore

This message was sent by Atlassian JIRA

View raw message