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 2022/03/28 01:14:00 UTC

[GitHub] [rocketmq] Oliverwqcwrw opened a new issue #4042: The 'store.log' print inaccurate message

Oliverwqcwrw opened a new issue #4042:
URL: https://github.com/apache/rocketmq/issues/4042


   
   **BUG REPORT**
   
   1. Please describe the issue you observed:
   
   
   - What did you do (The steps to reproduce)?
   
   Producer is sending 100 message to `Broker`,
   the `store.log` messsage  is
   
   >  disk space will be full soon, but delete file failed.
   2022-03-28 08:53:59 INFO DiskCheckScheduledThread1 - physic disk of commitLog used: 0.82
   2022-03-28 08:54:08 INFO StoreScheduledThread1 - physic disk maybe full soon, so reclaim space, 0.82, storePathPhysic=/Users/wangqiang/store/commitlog
   2022-03-28 08:54:08 INFO StoreScheduledThread1 - begin to delete before 72 hours file. timeup: false spacefull: true manualDeleteFileSeveralTimes: 0 cleanAtOnce: false
   
   - What is expected to see?
   it can delete file normally
   - What did you see instead?
   
   I still have 50G on my disk but it print the disk space will be full soon
   Why delete file is failed
   
   3. Please tell us about your environment:
   
   Mac OS12.3
   rocketMQ 4.9.3
   
   5. Other information (e.g. detailed explanation, logs, related issues, suggestions on how to fix, etc):
   
   


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

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] Oliverwqcwrw commented on issue #4042: The 'store.log' print inaccurate message

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


   Delete every 10 seconds, same message every time


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

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] HScarb commented on issue #4042: The 'store.log' print inaccurate message

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


   In your situation, disk space is above 75%, but lower than 85%, will delete expired files, but no files expired, so no files deleted.
   When CommitLog delete method is called but no files deleted, this log will be printed.
   `disk space will be full soon, but delete file failed.`
   reference: https://github.com/HScarb/knowledge/blob/master/rocketmq/RocketMQ_%E8%BF%87%E6%9C%9F%E6%96%87%E4%BB%B6%E5%88%A0%E9%99%A4%E6%9C%BA%E5%88%B6.md
   
   ```java
       // 满足下列条件之一将继续删除
       // 1. 到了设置的每天固定删除时间(4点)
       // 2. 磁盘空间不充足,默认为75%
       // 3. executeDeleteFilesManually方法被调用,手工删除文件
       if (timeup || spacefull || manualDelete) {
   
           if (manualDelete)
               this.manualDeleteFileSeveralTimes--;
   
           // 是否立即强制删除文件(磁盘空间大于85%为true)
           boolean cleanAtOnce = DefaultMessageStore.this.getMessageStoreConfig().isCleanFileForciblyEnable() && this.cleanImmediately;
   
           log.info("begin to delete before {} hours file. timeup: {} spacefull: {} manualDeleteFileSeveralTimes: {} cleanAtOnce: {}",
               fileReservedTime,
               timeup,
               spacefull,
               manualDeleteFileSeveralTimes,
               cleanAtOnce);
   
           // 文件保留时间,默认 72,这里转换成小时
           fileReservedTime *= 60 * 60 * 1000;
   
           // 删除成功的文件数量
           deleteCount = DefaultMessageStore.this.commitLog.deleteExpiredFile(fileReservedTime, deletePhysicFilesInterval,
               destroyMapedFileIntervalForcibly, cleanAtOnce);
           if (deleteCount > 0) {
           // 危险情况:磁盘满了,但是又无法删除文件
           } else if (spacefull) {
               log.warn("disk space will be full soon, but delete file failed.");
           }
       }
   ```


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

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] Oliverwqcwrw commented on issue #4042: The 'store.log' print inaccurate message

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


   As we can see, there is no file to delete but it show me deleting failed,It's ok?


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

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] Oliverwqcwrw closed issue #4042: The 'store.log' print inaccurate message

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


   


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

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] RongtongJin commented on issue #4042: The 'store.log' print inaccurate message

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


   消息的清理会在以下任一条件成立时执行:
   1、到达清理时点(默认凌晨4点),删除过期的文件(默认72小时);
   2、磁盘空间达到了 75% 水位线(默认),删除过期的文件(默认72小时);
   3、磁盘已经达到必须释放的上限(85%水位线)的时候,则开始批量清理文件(无论是否过期,仅保留最新的文件)。
   另:若磁盘空间达到危险水位线(默认90%),出于保护自身的目的,broker会拒绝写入服务。
   
   
   由于还没到85%的水位线,所以只会清理过期文件(72小时以上的)


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

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] Oliverwqcwrw commented on issue #4042: The 'store.log' print inaccurate message

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


   Can prompt no files to delete?


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

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org