dubbo
dubbo copied to clipboard
DubboSaveRegistryCache thread cost a lot of cpu time when device is full
- [ ] I have searched the issues of this repository and believe that this is not a duplicate.
- [ ] I have checked the FAQ of this repository and believe that this is not a duplicate.
Environment
- Dubbo version: 2.7.3 & 2.5.10
- Operating System version: mac
- Java version: JDk 1.8
Steps to reproduce this issue
- DubboSaveRegistryCache thread cost a lot of cpu when device is full.
[DUBBO] Failed to save registry store file, cause: No space left on device, dubbo version: 2.0.1, current host: 10.14.129.133
java.io.IOException: No space left on device
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:326)
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
at java.io.BufferedWriter.flush(BufferedWriter.java:254)
at java.util.Properties.store0(Properties.java:844)
at java.util.Properties.store(Properties.java:818)
at com.alibaba.dubbo.registry.support.AbstractRegistry.doSaveProperties(AbstractRegistry.java:169)
at com.alibaba.dubbo.registry.support.AbstractRegistry$SaveProperties.run(AbstractRegistry.java:490)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
- when device is full, it will retry doSaveProperties and log warn in infinite loop.
Pls. provide [GitHub address] to reproduce this issue.
Expected Result
Seems the version check is not takes effect, doSaveProperties should be stopped.
Actual Result
retry doSaveProperties when device is full takes a lot of cpu time.
Duplicate of #3746 (#3748)
Duplicate of #3746 (#3748)
Got it, it has been fixed in 2.7.2.