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

The Md5 logic of ConfigCache is rebundant #12872

Closed
Sunrisea opened this issue Nov 21, 2024 · 1 comment
Closed

The Md5 logic of ConfigCache is rebundant #12872

Sunrisea opened this issue Nov 21, 2024 · 1 comment
Labels
area/Config kind/enhancement Category issues or prs related to enhancement.

Comments

@Sunrisea
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Nacos服务端的配置缓存ConfigCache中包含了GBK编码的md5值,但目前Nacos配置中心统一使用的编码方式为UTF-8,GBK编码的md5值并没有使用,这部分代码是多余的
ConfigCache on the Nacos server includes md5 values encoded in GBK, but currently, the Nacos configuration center uniformly uses UTF-8 encoding. The GBK-encoded md5 values are not being used, making this part of the code redundant.

Describe the solution you'd like
重构ConfigCache以及相关的链路(配置监听,配置查询,DumpService),md5字段和相关方法统一使用utf-8编码,并确保对其他类型编码支持的扩展性。
Refactor ConfigCache and related pathways (configuration listening, configuration querying, DumpService) to uniformly use UTF-8 encoding for md5 fields and related methods, and ensure the extensibility for support of other types of encoding.

Describe alternatives you've considered
创建ConfigCacheFactory接口,通过ConfigCacheFactory来进行ConfigCache的创建,相关链路和方法利用SPI机制来保证对于其他类型编码支持的扩展性,并实现默认的UTF-8编码md5值的处理方法
Create the ConfigCacheFactory interface to handle the creation of ConfigCache instances. Utilize the SPI (Service Provider Interface) mechanism in related pathways and methods to ensure extensibility for support of other types of encoding, and implement the default handling methods for UTF-8 encoded md5 values.

@KomachiSion KomachiSion added area/Config kind/enhancement Category issues or prs related to enhancement. labels Nov 21, 2024
@KomachiSion
Copy link
Collaborator

其实应该吧请求的编码和存储的编码分离开。

@Sunrisea Sunrisea changed the title The code related to GBK-encoded md5 values in the Nacos server is not used. The Md5 logic of ConfigCache is rebundunt Nov 21, 2024
@Sunrisea Sunrisea changed the title The Md5 logic of ConfigCache is rebundunt The Md5 logic of ConfigCache is rebundant Nov 21, 2024
shiyiyue1102 pushed a commit that referenced this issue Dec 9, 2024
…e UTF-8 encoding for md5 fields (#12931)

* Refactor ConfigCache and related pathways optimize encoding for md5 fields. Utilize the SPI mechanism in related pathways and methods to ensure extensibility for config cache
YunWZ pushed a commit to YunWZ/nacos that referenced this issue Dec 13, 2024
…rmly use UTF-8 encoding for md5 fields (alibaba#12931)

* Refactor ConfigCache and related pathways optimize encoding for md5 fields. Utilize the SPI mechanism in related pathways and methods to ensure extensibility for config cache
YunWZ pushed a commit to YunWZ/nacos that referenced this issue Dec 23, 2024
…rmly use UTF-8 encoding for md5 fields (alibaba#12931)

* Refactor ConfigCache and related pathways optimize encoding for md5 fields. Utilize the SPI mechanism in related pathways and methods to ensure extensibility for config cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/Config kind/enhancement Category issues or prs related to enhancement.
Projects
None yet
Development

No branches or pull requests

3 participants