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 "Francesco Mari (JIRA)" <ji...@apache.org> on 2018/06/19 12:20:00 UTC
[jira] [Comment Edited] (OAK-7551) The compaction deadline should
be reset at each execution
[ https://issues.apache.org/jira/browse/OAK-7551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16517002#comment-16517002 ]
Francesco Mari edited comment on OAK-7551 at 6/19/18 12:19 PM:
---------------------------------------------------------------
I need the {{ShortCircuitCanceller}} in order to allow the caller to read a cancellation result in a coherent way (like it's done [here|https://github.com/apache/jackrabbit-oak/blob/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/AbstractCompactionStrategy.java#L152] or [here|https://github.com/apache/jackrabbit-oak/blob/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/AbstractCompactionStrategy.java#L207]). Even if the boolean predicates might yield different results between one check and the other, I need to provide the same {{Cancellation}} more than once in order to have coherent reporting. It's not by chance that short-circuiting is used only when log messages are printed.
I think it's wrong to embed short-circuiting in every {{Canceller}}. Think of a disk space check: it might be good at one time, but it might not be the other, and it's perfectly fine. If the disk space usage adjusts itself between checks, I shouldn't stop my long-running process because of a short-lived peak in disk space usage.
was (Author: frm):
I need the {{ShortCircuitCanceller}} in order to allow the caller to read a cancellation strategy in a coherent way (like it's done [here|https://github.com/apache/jackrabbit-oak/blob/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/AbstractCompactionStrategy.java#L152] or [here|https://github.com/apache/jackrabbit-oak/blob/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/AbstractCompactionStrategy.java#L207]). Even if the boolean predicates might yield different results between one check and the other, I need to provide the same {{Cancellation}} more than once in order to have coherent reporting. It's not by chance that short-circuiting is used only when log messages are printed.
I think it's wrong to embed short-circuiting in every {{Canceller}}. Think of a disk space check: it might be good at one time, but it might not be the other, and it's perfectly fine. If the disk space usage adjusts itself between checks, I shouldn't stop my long-running process because of a short-lived peak in disk space usage.
> The compaction deadline should be reset at each execution
> ---------------------------------------------------------
>
> Key: OAK-7551
> URL: https://issues.apache.org/jira/browse/OAK-7551
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: segment-tar
> Reporter: Francesco Mari
> Assignee: Francesco Mari
> Priority: Major
> Fix For: 1.10, 1.9.5
>
>
> The compaction deadline, represented by {{CancelCompactionSupplier}}, should be reset before each usage with a proper timeout. This doesn't happen at the beginning of the compaction phase in {{AbstractCompactionStrategy#compact}}, which results in the timeout condition to be ignored.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)