[
https://issues.apache.org/jira/browse/ROCKETMQ-23?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15782506#comment-15782506
]
ASF GitHub Bot commented on ROCKETMQ-23:
----------------------------------------
GitHub user shroman opened a pull request:
https://github.com/apache/incubator-rocketmq/pull/20
[ROCKETMQ-23] MappedFileQueue#flush should return true when flushing …
…is successful.
Jira issue: https://issues.apache.org/jira/browse/ROCKETMQ-23
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/shroman/incubator-rocketmq ROCKETMQ-23
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-rocketmq/pull/20.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #20
----
commit 1828ad74fbd9c92b41522c3b985b41c29daf67f6
Author: shtykh_roman <[email protected]>
Date: 2016-12-28T09:36:10Z
[ROCKETMQ-23] MappedFileQueue#flush should return true when flushing is
successful.
Jira issue: https://issues.apache.org/jira/browse/ROCKETMQ-23
----
> 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: Bug
> Components: rocketmq-store
> Affects Versions: 4.0.0-incubating
> Reporter: Roman Shtykh
> Assignee: Roman Shtykh
>
> 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.3.4#6332)