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

作业在console更新后,executor运行时报JsonUtils.fromJSON 的错误 #570

Closed
heziai opened this issue Jan 11, 2019 · 0 comments
Closed
Assignees
Milestone

Comments

@heziai
Copy link
Member

heziai commented Jan 11, 2019

customContext新增结点,值为空字符串,旧版Executor(3.0.0-M5及其以下版本)反序列化该空字符串为Map时报错。

原因是新版console在保存到ZK时不兼容,旧版console的逻辑是:如果作业配置字段为null,则不保存或不更新。 而新版本console的逻辑是:如果作业配置字段为null,则新增或更新结点,值为空字符串。

修复方式:

  • 将作业字段默认为null的改成默认有意义的值,比如customContext默认值改为"{}"。 还有shardingItemParameters也是类似的问题,将其默认值改为""
  • 新增或更新zk前,仍然回到旧版console的逻辑,判断如果值为null,则不保存或不更新。
@heziai heziai added the bug label Jan 11, 2019
@heziai heziai added this to the 3.3.1 milestone Jan 11, 2019
@heziai heziai self-assigned this Jan 11, 2019
heziai added a commit that referenced this issue Jan 11, 2019
@heziai heziai modified the milestones: 3.3.1, 3.3.2 Jan 11, 2019
@heziai heziai added the done label Jan 11, 2019
@kfchu kfchu changed the title Console新增、更新作业时保存到ZK,旧版Executor对某些配置不兼容 作业在console更新后,executor运行时报JsonUtils.fromJSON 的错误 Jan 18, 2019
@kfchu kfchu closed this as completed Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants