You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@rocketmq.apache.org by "vongosling (JIRA)" <ji...@apache.org> on 2017/12/13 08:31:00 UTC

[jira] [Closed] (ROCKETMQ-23) MappedFileQueue#flush should return true when flushing is successful

     [ https://issues.apache.org/jira/browse/ROCKETMQ-23?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

vongosling closed ROCKETMQ-23.
------------------------------
    Resolution: Later

> MappedFileQueue#flush should return true when flushing is successful
> --------------------------------------------------------------------
>
>                 Key: ROCKETMQ-23
>                 URL: https://issues.apache.org/jira/browse/ROCKETMQ-23
>             Project: Apache RocketMQ
>          Issue Type: Improvement
>          Components: rocketmq-store
>    Affects Versions: 4.0.0-incubating
>            Reporter: Roman Shtykh
>            Assignee: Roman Shtykh
>             Fix For: 4.2.0
>
>
> In the current implementation, MappedFileQueue#flush returns {{false}} when flushing is successful.
> This is not intuitive and error prone.
> For instance, in {{CommitLog#run line:915-918}}
> {code}
> for (int i = 0; i < RETRY_TIMES_OVER && !result; i++) {
>    result = CommitLog.this.mappedFileQueue.flush(0);
>    // ...
> }
> {code}
> I believe retries has to be done when flushing is not successful. But with the code above, it can try to flush only once on CommitLog termination and not continue retrying.
> The same is for {{DefaultMessageStore#doFlush line:1551}}
> Or is this not retry on failure, but the number of times flushing has to be done? Then, {{RETRY_TIMES_OVER}} should be renamed to something like {{FLUSH_NUM}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)