Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Breaking changes,访问记录存储优化 #19

Closed
jwma opened this issue May 29, 2020 · 1 comment · Fixed by #20
Closed

Breaking changes,访问记录存储优化 #19

jwma opened this issue May 29, 2020 · 1 comment · Fixed by #20
Assignees
Milestone

Comments

@jwma
Copy link
Owner

jwma commented May 29, 2020

背景

在前期设计时,没有过多考虑到数据统计、报表的需求,所以在存储访问请求的数据类型上选择不恰当,原计划在 v1.3.0 版本中增加关于短链接的数据统计相关特性,但在准备开发时发现 list 的确不利于数据统计,所以会在 v1.3.0 版本中先修改其为 zset。(当然,我到目前为止还是没有想要加入传统数据库到 jump-jump 来)

改动

升级至 v1.3.0

如果你原本已经部署过 v1.3.0 之前的版本,现在需要升级到 v1.3.0 版本且希望保留过往的短链接访问记录数据,则需要在部署 v1.3.0 之后,运行 migraterequesthistory 程序,假设你是使用 docker-compose 部署,则可以这样操作:

docker-compose -f deployments/docker-compose.yaml exec apiserver ./migraterequesthistory

在看到类似于这样的输出后,则代表数据迁移完毕:

[V1.2.0] 总共有 2 个短链接的访问记录可能需要迁移
[V1.2.0] 迁移完毕

[V1.3.0] 总共有 2 个短链接的访问记录可能需要迁移
[V1.3.0] 迁移完毕
@jwma jwma added this to the v1.3.0 milestone May 29, 2020
@jwma jwma self-assigned this May 29, 2020
@jwma jwma pinned this issue May 29, 2020
@jwma jwma closed this as completed Jun 1, 2020
@guvmao
Copy link

guvmao commented Jul 14, 2020

image
已升级,非常美妙~

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants