You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2019/08/20 07:37:49 UTC

[GitHub] [rocketmq] qqeasonchen opened a new issue #1400: Disk space detection is blocked when it cost too much time to delete files

qqeasonchen opened a new issue #1400: Disk space detection is blocked when it cost too much time to delete files
URL: https://github.com/apache/rocketmq/issues/1400
 
 
   **BUG REPORT**
   
   1. Please describe the issue you observed:
       在DefaultMessageStore类中,为了删除过期的文件调用了deleteExpiredFiles(),其中为了检查磁盘的使用情况调用了isSpaceToDelete()函数,如果磁盘使用率达到阈值会触发过期文件的删除。
       其中有一个标志变量diskok来标识磁盘是否即将写满(大于diskSpaceWarningLevelRatio),如果是,broker将会拒绝接受消息。
       如果在调用isSpaceToDelete时磁盘的使用率大于阈值触发了磁盘文件的删除,但使用率未达到
   diskSpaceWarningLevelRatio不会置位diskok,这意味着broker会继续写入消息。如果此时写入消息的速度超过了文件删除的速度,磁盘使用率会继续上升,当达到diskSpaceWarningLevelRatio时,由于还在执行isSpaceToDelete中的删除代码,无法查询磁盘的使用率,标志变量diskok就无法及时更新,磁盘可能就完全写满导致出错。
   
   
   3. Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):
   建议使用单独的查询线程来更新标志变量diskok。
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services