Skip to content
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

mac 下 nacos 启动时加载 datum 的缓存文件出现 json 转换异常 #2839

Closed
lin-mt opened this issue May 20, 2020 · 0 comments · Fixed by #2849
Closed

mac 下 nacos 启动时加载 datum 的缓存文件出现 json 转换异常 #2839

lin-mt opened this issue May 20, 2020 · 0 comments · Fixed by #2849
Labels
kind/bug Category issues or prs related to bug.
Milestone

Comments

@lin-mt
Copy link
Contributor

lin-mt commented May 20, 2020

Issue Description

Type: bug report or feature request

Describe what happened (or what feature you want)

nacos 启动时加载 datum 缓存文件报错,在 com.alibaba.nacos.naming.consistency.persistent.raft.RaftStore#readDatum 方法中加载目录~/nacos/data/naming/data 下的缓存文件时没有判断缓存文件是否为 nacos 生成的缓存,Mac 系统会自动生成 .Ds_Store 文件,导致在方法中的 return JSON.parseObject(json, Datum.class); 会报 json 转换异常。

Error loading datum cache file at Nacos startup, at com.alibaba.nacos.Naming.consistency.persistent.Raft.RaftStore#readDatum The method loads the cache file under directory ~/nacos/data/naming/data without determining whether the cache file is a nacos-generated cache. The Mac system automatically generates .DS_Store file, resulting in return JSON.parseObject(json,Datum.class); a json conversion exception will be reported.

Describe what you expected to happen

How to reproduce it (as minimally and precisely as possible)

Tell us your environment

macOS Catalina 10.15.4
nacos-version: 1.3.0-BETA

Anything else we need to know?

我想通过加后缀来解决这个问题。
I want to solve this problem by adding a suffix.
@i will solve it@

@lin-mt lin-mt mentioned this issue May 22, 2020
5 tasks
@KomachiSion KomachiSion linked a pull request Jun 10, 2020 that will close this issue
5 tasks
KomachiSion added a commit that referenced this issue Jun 10, 2020
@KomachiSion KomachiSion added this to the 1.3.1 milestone Jun 30, 2020
@KomachiSion KomachiSion added the kind/bug Category issues or prs related to bug. label Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Category issues or prs related to bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants