Julian Sedding created OAK-12565:
------------------------------------

             Summary: Record deduplication caches may introduce forward 
references
                 Key: OAK-12565
                 URL: https://issues.apache.org/jira/browse/OAK-12565
             Project: Jackrabbit Oak
          Issue Type: Bug
          Components: segment-tar
    Affects Versions: 2.8.0
            Reporter: Julian Sedding
            Assignee: Julian Sedding


A segment writer can reuse a cached {{Record}} from another writer’s buffer 
before that segment is persisted. If the referring segment is appended first, 
it points forward in TAR order. It is even possible that two segments reference 
each other. This can be unsafe: cleanup of "dangling future segments" assumes 
that compacted segments written after the last compacted root are unreachable 
and may reclaim them (see OAK-12400).

Publish shared deduplication cache entries only after the owning segment is 
successfully written. Preserve safe reuse within the same buffer, and never 
publish entries from a failed write.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to