-
Notifications
You must be signed in to change notification settings - Fork 26.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
缓存文件找不到, 导致的死循环 #6140
Comments
hello @lizhibo0914 , by given information , I am try to reproduce by a test in AbstractRegistryTest.java @Test
public void testDoSaveProperties() throws NoSuchFieldException, IllegalAccessException, IOException {
String defaultFilename = System.getProperty("user.home") + "/.dubbo/dubbo-registry-" + testUrl.getParameter(APPLICATION_KEY) + "-" + testUrl.getAddress().replaceAll(":", "-") + ".cache";
File mockFile = spy(new File(defaultFilename));
Field fileField = abstractRegistry.getClass().getSuperclass().getDeclaredField("file");
fileField.setAccessible(true);
fileField.set(abstractRegistry, mockFile);
doReturn(false).when(mockFile).exists();
doThrow(new IOException(" no such file or dir ")).when(mockFile).createNewFile();
abstractRegistry.doSaveProperties(1);
} but I cannot reproduce it it's output
maybe it'd fixed in #3748 can you give a demo program to reproduce |
No feedback for a long time, please close the issue temporarily. If there is still a problem, you can reopen it. |
正式项目中, 发现dubbo在运行中 ,出现了缓存文件找不到的现象出现了死循环, 疯狂打印日志, 导致cpu特别高, 一直循环打印: Failed to save registry store file, cause: 没有那个文件活目录
The text was updated successfully, but these errors were encountered: