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 2020/06/03 06:50:23 UTC

[GitHub] [rocketmq] moruikang opened a new issue #2067: logics disk maybe full soon, so reclaim space, -1.0

moruikang opened a new issue #2067:
URL: https://github.com/apache/rocketmq/issues/2067


   The issue tracker is **ONLY** used for bug report(feature request need to follow [RIP process](https://github.com/apache/rocketmq/wiki/RocketMQ-Improvement-Proposal)). Keep in mind, please check whether there is an existing same report before your raise a new one.
   
   Alternately (especially if your communication is not a bug report), you can send mail to our [mailing lists](http://rocketmq.apache.org/about/contact/). We welcome any friendly suggestions, bug fixes, collaboration and other improvements.
   
   Please ensure that your bug report is clear and that it is complete. Otherwise, we may be unable to understand it or to reproduce it, either of which would prevent us from fixing the bug. We strongly recommend the report(bug report or feature request) could include some hints as the following:
   
   **BUG REPORT**
   
   1. Please describe the issue you observed:
   我搭建2m-2s的rocketmq集群,3个nameserver,做benchmark的时候发现slave无法同步master数据,store.log日志里一直报磁盘满的信息:
   2020-06-02 11:35:54 WARN StoreScheduledThread1 - disk space will be full soon, but delete file failed.
   2020-06-02 11:35:54 INFO StoreScheduledThread1 - logics disk maybe full soon, so reclaim space, -1.0
   2020-06-02 11:35:54 INFO StoreScheduledThread1 - begin to delete before 120 hours file. timeup: false spacefull: true manualDeleteFileSeveralTimes: 0 cleanAtOnce: false
   2020-06-02 11:35:54 WARN StoreScheduledThread1 - disk space will be full soon, but delete file failed.
   2020-06-02 11:35:55 WARN AdminBrokerThread_8 - selectMappedBuffer request pos invalid, request pos: 0, size: 8388608, fileFromOffset: 0
   2020-06-02 11:35:56 WARN AdminBrokerThread_9 - selectMappedBuffer request pos invalid, request pos: 0, size: 8388608, fileFromOffset: 0
   2020-06-02 11:35:57 WARN AdminBrokerThread_10 - selectMappedBuffer request pos invalid, request pos: 0, size: 8388608, fileFromOffset: 0
   2020-06-02 11:36:00 WARN AdminBrokerThread_11 - selectMappedBuffer request pos invalid, request pos: 0, size: 8388608, fileFromOffset: 0
   2020-06-02 11:36:04 INFO StoreScheduledThread1 - logics disk maybe full soon, so reclaim space, -1.0
   2020-06-02 11:36:04 INFO StoreScheduledThread1 - begin to delete before 120 hours file. timeup: false spacefull: true manualDeleteFileSeveralTimes: 0 cleanAtOnce: false
   2020-06-02 11:36:04 WARN StoreScheduledThread1 - disk space will be full soon, but delete file failed.
   
   可实际上我的磁盘空间剩余90%
   我去查看过源码,
    DefaultMessageStore.log.info("logics disk maybe full soon, so reclaim space, "
                               + logicsRatio)
   ===>
   logics disk maybe full soon, so reclaim space, -1.0
   logicsRatio == -0.1是什么意思?
   
   - What did you do (The steps to reproduce)?
   搭建2m-2s集群,3个nameserver
   - What did you expect to see?
   主从可以同步数据
   - What did you see instead?
   a
   2. Please tell us about your environment:
   - java 8
   - 
   3. Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):
   
   **FEATURE REQUEST**
   
   1. Please describe the feature you are requesting.
   
   2. Provide any additional detail on your proposed use case for this feature.
   
   2. Indicate the importance of this issue to you (blocker, must-have, should-have, nice-to-have). Are you currently using any workarounds to address this issue?
   
   4. If there are some sub-tasks using -[] for each subtask and create a corresponding issue to map to the sub task:
   
   - [sub-task1-issue-number](example_sub_issue1_link_here): sub-task1 description here, 
   - [sub-task2-issue-number](example_sub_issue2_link_here): sub-task2 description here,
   - ...
   


----------------------------------------------------------------
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



[GitHub] [rocketmq] imaffe commented on issue #2067: logics disk maybe full soon, so reclaim space, -1.0

Posted by GitBox <gi...@apache.org>.
imaffe commented on issue #2067:
URL: https://github.com/apache/rocketmq/issues/2067#issuecomment-645163000


   ```
       public static double getDiskPartitionSpaceUsedPercent(final String path) {
           if (null == path || path.isEmpty())
               return -1;
   
           try {
               File file = new File(path);
   
               if (!file.exists())
                   return -1;
   
               long totalSpace = file.getTotalSpace();
   
               if (totalSpace > 0) {
                   long freeSpace = file.getFreeSpace();
                   long usedSpace = totalSpace - freeSpace;
   
                   return usedSpace / (double) totalSpace;
               }
           } catch (Exception e) {
               return -1;
           }
   
           return -1;
       }
   ```
   
   Here, if filePath is null or empty or got an exception, the ratio would be -1; I would recommend use [Arthas](https://alibaba.github.io/arthas/) to make sure the filePath is valid. Then we can try to print out the Exception message here and see if it is permission related problems.
   
   And I think this place we need to log what the exception is or record what is the cause of returning -1. If you are interested in enhance this place feel free to submit a PR.


----------------------------------------------------------------
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



[GitHub] [rocketmq] RongtongJin closed issue #2067: logics disk maybe full soon, so reclaim space, -1.0

Posted by GitBox <gi...@apache.org>.
RongtongJin closed issue #2067:
URL: https://github.com/apache/rocketmq/issues/2067


   


----------------------------------------------------------------
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