[ISSUE #5429]fix spi (#5429)

This commit is contained in:
Robert LU 2021-04-21 13:44:24 +08:00 committed by GitHub
parent 291a969e7d
commit 024f73866a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -160,7 +160,6 @@ public class NacosConfigService implements ConfigService {
ConfigResponse response = worker.getServerConfig(dataId, group, tenant, timeoutMs);
cr.setContent(response.getContent());
cr.setEncryptedDataKey(response.getEncryptedDataKey());
configFilterChainManager.doFilter(null, cr);
configFilterChainManager.doFilter(null, cr);
content = cr.getContent();

View File

@ -91,6 +91,13 @@ public class LocalEncryptedDataKeyProcessor extends LocalConfigInfoProcessor {
LOGGER.error("[" + envName + "] delete snapshot error, " + file, ioe);
}
} else {
File parentFile = file.getParentFile();
if (!parentFile.exists()) {
boolean isMdOk = parentFile.mkdirs();
if (!isMdOk) {
LOGGER.error("[{}] save snapshot error", envName);
}
}
if (JvmUtil.isMultiInstance()) {
ConcurrentDiskUtil.writeFileContent(file, encryptDataKey, Constants.ENCODE);
} else {