[
https://issues.apache.org/jira/browse/ROCKETMQ-45?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15833263#comment-15833263
]
ASF GitHub Bot commented on ROCKETMQ-45:
----------------------------------------
Github user coveralls commented on the issue:
https://github.com/apache/incubator-rocketmq/pull/39
[](https://coveralls.io/builds/9784804)
Coverage increased (+0.1%) to 25.854% when pulling
**b8e53c990e0b467c2a2b766137f7b32f3b5b6f04 on lizhanhui:ROCKETMQ-45** into
**b29c318cdde225ef3a33a73e939e49e087766a28 on apache:master**.
> Delete consume queue hang file
> ------------------------------
>
> Key: ROCKETMQ-45
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-45
> Project: Apache RocketMQ
> Issue Type: Bug
> Components: rocketmq-store
> Affects Versions: 4.1.0-incubating
> Reporter: Zhanhui Li
> Assignee: yukon
> Fix For: 4.1.0-incubating
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> Consume queue file may hang and stop further deleting under concurrent
> scenario.
> If the consume queue file is concurrently held by another thread,
> mappedFile.destroy(interval) will only set firstShutdownTimestamp to current
> timestamp and available false, then return false directly.
> Check MappedFileQueue.java#deleteExpiredFileByOffset,
> if (destroy && mappedFile.destroy(1000 * 60)) {
> files.add(mappedFile);
> deleteCount++;
> } else {
> break;
> }
> the current round of deletion will be stopped and current mapped file becomes
> handed.
> Next time trying to delete mapped file of this mapped file queue,
> MappedFileQueue.java#deleteExpiredFileByOffset(offset, unitSize) line No.390
> MappedFile mappedFile = (MappedFile) mfs[i];
> SelectMappedBufferResult result =
> mappedFile.selectMappedBuffer(this.mappedFileSize - unitSize);
> will always return null as the mapped file is no longer available and cannot
> hold. Current implementation will only log a warn and exit.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)