[
https://issues.apache.org/jira/browse/OAK-7101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Marcel Reutegger updated OAK-7101:
----------------------------------
Attachment: OAK-7101.png
The following diagram shows a possible sequence of calls for a concurrently
executed query and update:
[^OAK-7101.png]
The critical section is when the update adds the key to the query context and
then calls {{replaceCachedDocument}}. Those methods can interleave with the
query's call to {{mayUpdate}} and {{putIfNewer}}. The problem only occurs when
the cache does not contain the document at this point.
{{replaceCachedDocument}} then becomes a NOP and {{putIfNewer}} puts a stale
document in the cache.
> Stale documents in RDBDocumentStore cache
> -----------------------------------------
>
> Key: OAK-7101
> URL: https://issues.apache.org/jira/browse/OAK-7101
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: rdbmk
> Affects Versions: 1.0, 1.4.0, 1.6.0, 1.2.0
> Reporter: Marcel Reutegger
> Assignee: Julian Reschke
> Fix For: 1.0.40, 1.4.19, 1.6.8, 1.8, 1.2.28, 1.7.15
>
> Attachments: OAK-7101.patch, OAK-7101.png, query-lock.diff
>
>
> Concurrent query and update operations on RDBDocumentStore may result in
> stale entries in the document cache.
> Potentially related issues are OAK-5387 and OAK-6062.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)