[
https://issues.apache.org/jira/browse/OAK-9562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17407289#comment-17407289
]
Thomas Mueller commented on OAK-9562:
-------------------------------------
> The conditional update was there from the very beginning
Do you mean the condition "nd.hasBinary() != 1" ?
{noformat}
+ for (String path : this.nodesWithBinaries) {
+ NodeDocument nd =
+ (NodeDocument) store.getIfCached(Collection.NODES,
Utils.getIdFromPath(path));
+ if ((nd == null) || (nd.hasBinary() != 1)) {
+ UpdateOp updateParentOp = getUpdateOperationForNode(path);
+ NodeDocument.setHasBinary(updateParentOp);
+ }
+ }
{noformat}
> do you remember why this condition was added?
I think the idea was to avoid setting the flag if the flag is already set.
So basically, the problem is that "NodeDocument nd" only exists in the cache,
and doesn't reflect what is on MongoDB. Yes, so I think I understand this is a
problem, and I think removing the condition (simplifying the logic) to
something like this should work fine:
{noformat}
+ for (String path : this.nodesWithBinaries) {
+ NodeDocument.setHasBinary(getUpdateOperationForNode(path));
+ }
{noformat}
> Missing _bin when node is recreated after revision GC
> -----------------------------------------------------
>
> Key: OAK-9562
> URL: https://issues.apache.org/jira/browse/OAK-9562
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: documentmk
> Affects Versions: 1.6.0, 1.8.0, 1.22.0, 1.40.0
> Reporter: Marcel Reutegger
> Assignee: Marcel Reutegger
> Priority: Major
>
> When a node with a binary property is recreated after a revision GC
> operation, it may happen that the document for the node is missing the _bin
> flag. A subsequent blob store garbage collection then removes the blob.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)