You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Julian Reschke (JIRA)" <ji...@apache.org> on 2017/03/02 15:56:45 UTC
[jira] [Comment Edited] (OAK-5878) SplitDocumentCleanup iterates
twice over splitDocGarbage
[ https://issues.apache.org/jira/browse/OAK-5878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15892452#comment-15892452 ]
Julian Reschke edited comment on OAK-5878 at 3/2/17 3:56 PM:
-------------------------------------------------------------
While working on this, I noticed that {{VersionGarbageCollectorIT.gcWithConcurrentModification()}} bypasses persistence-specific variants, because of:
{code}
VersionGCSupport gcSupport = new VersionGCSupport(store.getDocumentStore()) {
@Override
public Iterable<NodeDocument> getPossiblyDeletedDocs(long lastModifiedTime) {
return filter(super.getPossiblyDeletedDocs(lastModifiedTime),
new Predicate<NodeDocument>() {
@Override
public boolean apply(NodeDocument input) {
try {
docs.put(input);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
return true;
}
});
}
};
{code}
Is this something we need to be worried about?
was (Author: reschke):
While working on this, I noticed that {{VersionGarbageCollectorIT.gcWithConcurrentModification()}} bypasses persistence-specific variants, because of:
{{noformat}}
VersionGCSupport gcSupport = new VersionGCSupport(store.getDocumentStore()) {
@Override
public Iterable<NodeDocument> getPossiblyDeletedDocs(long lastModifiedTime) {
return filter(super.getPossiblyDeletedDocs(lastModifiedTime),
new Predicate<NodeDocument>() {
@Override
public boolean apply(NodeDocument input) {
try {
docs.put(input);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
return true;
}
});
}
};
{{noformat}}
Is this something we need to be worried about?
> SplitDocumentCleanup iterates twice over splitDocGarbage
> --------------------------------------------------------
>
> Key: OAK-5878
> URL: https://issues.apache.org/jira/browse/OAK-5878
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: documentmk
> Reporter: Julian Reschke
> Assignee: Julian Reschke
> Attachments: OAK-5878.diff
>
>
> {{SplitDocumentCleanup}} currently iterates twice over {{splitDocGarbage}}.
> NOTE: not the case for Mongo DB, as {{MongoVersionGCSupport}} overwrites {{deleteSplitDocuments()}}.
> {{deleteSplitDocuments()}} currently iterates over {{splitDocGarbage}} to obtain the IDs of the documents to be deleted. Instead, we could just collect the IDs inside {{disconnect()}}, the memory requirements would be the same.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)