You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I want to change nacos cache dir. but if i special the property "com.alibaba.nacos.naming.cache.dir", the cache dir dismissed {namespce} path。
Describe the solution you'd like
I check the code in com.alibaba.nacos.client.naming.NacosNamingService ,seems cacheDir should mean nacos home 。see below。
it shold cacheDir = System.getProperty("com.alibaba.nacos.naming.cache.dir")+/naming/" + namespace;
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
the origin code is:
private void initCacheDir() { cacheDir = System.getProperty("com.alibaba.nacos.naming.cache.dir");
if (StringUtils.isEmpty(cacheDir)) {
cacheDir = System.getProperty("user.home") + "/nacos/naming/" + namespace;
}
}
The text was updated successfully, but these errors were encountered:
looks good. And can you check for config module, it should have another cache dir.
What's more, there may be some other dir is depend user.home, we may need to organize and discuss whether these cache dirs can be processed in a unified manner.
This is concerned with the unification of paths in naming module.
The unification process includes two parts.
Unifying the cache paths of config module (see PR [ISSUE#3533] change cache dir with namespace -- part 1 #3859 ):
(1) If the environment variable 'JM.SNAPSHOT.PATH' is set, use ${sys:JM.SNAPSHOT.PATH}/nacos/naming as the parent dir of naming cache files.
(2) Else, use ${sys:user.home}/nacos/config as the parent dir of cache files.
In this way, config cache and naming cache are in step with each other.
Unifying the logging paths (see PR [ISSUE#3533] change cache dir with namespace -- part 2 #3882 ):
(1) If the environment variable 'JM.LOG.PATH' is set, use ${sys:JM.LOG.PATH}/nacos as the parent dir of log files for naming and config module.
(2) Else, use ${sys:user.home}/logs/nacos as the parent dir of log files.
Is your feature request related to a problem? Please describe.
I want to change nacos cache dir. but if i special the property "com.alibaba.nacos.naming.cache.dir", the cache dir dismissed {namespce} path。
Describe the solution you'd like
I check the code in com.alibaba.nacos.client.naming.NacosNamingService ,seems cacheDir should mean nacos home 。see below。
it shold cacheDir = System.getProperty("com.alibaba.nacos.naming.cache.dir")+/naming/" + namespace;
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
the origin code is:
private void initCacheDir() {
cacheDir = System.getProperty("com.alibaba.nacos.naming.cache.dir");
if (StringUtils.isEmpty(cacheDir)) {
cacheDir = System.getProperty("user.home") + "/nacos/naming/" + namespace;
}
}
The text was updated successfully, but these errors were encountered: