[ 
https://issues.apache.org/jira/browse/ROCKETMQ-45?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15833269#comment-15833269
 ] 

ASF GitHub Bot commented on ROCKETMQ-45:
----------------------------------------

Github user coveralls commented on the issue:

    https://github.com/apache/incubator-rocketmq/pull/39
  
    
    [![Coverage 
Status](https://coveralls.io/builds/9784819/badge)](https://coveralls.io/builds/9784819)
    
    Coverage increased (+0.1%) to 25.814% when pulling 
**57111a02721ac8d70de3bb6210db4cf13f4714a9 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)

Reply via email to