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

[Bug] 产生了 key 相同的 page #984

Open
krau opened this issue Sep 22, 2024 · 6 comments
Open

[Bug] 产生了 key 相同的 page #984

krau opened this issue Sep 22, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@krau
Copy link

krau commented Sep 22, 2024

相关 #971

从 2.9.0 升级后出现, 启用了 redis 缓存.

image

升级后启动时日志:

 ________  ________  _________  ________  ___       ___  __
|\   __  \|\   __  \|\___   ___\\   __  \|\  \     |\  \|\  \
\ \  \|\  \ \  \|\  \|___ \  \_\ \  \|\  \ \  \    \ \  \/  /|_
 \ \   __  \ \   _  _\   \ \  \ \ \   __  \ \  \    \ \   ___  \
  \ \  \ \  \ \  \\  \|   \ \  \ \ \  \ \  \ \  \____\ \  \\ \  \
   \ \__\ \__\ \__\\ _\    \ \__\ \ \__\ \__\ \_______\ \__\\ \__\
    \|__|\|__|\|__|\|__|    \|__|  \|__|\|__|\|_______|\|__| \|__|

Artalk (v2.9.1)

 -> A Self-hosted Comment System.
 -> https://artalk.js.org

-------------------------------


 ┌───────────────────────────────────────────────────┐ 
 │                   Fiber v2.52.5                   │ 
 │              http://127.0.0.1:23366               │ 
 │                                                   │ 
 │ Handlers ........... 108  Processes ........... 1 │ 
 │ Prefork ....... Disabled  PID ............ 850974 │ 
 └───────────────────────────────────────────────────┘ 

2024/09/21 08:56:55.501 ERROR [common/check.go:15] 需要管理员权限 {"id": "b4exxxxxxxxxxxxxd0214", "path": "/api/v2/sites", "method": "GET", "ip": "xxxxxxx", "remote_addr": "127.0.0.1:59806", "host": "host", "referer": "", "user_agent": "UA", "status": 403}
2024/09/21 08:56:55.503 ERROR [HTTP] 08:56:55 | 403 |    3.161486ms | xxxxx | GET | /api/v2/sites | - | b4exxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2024/09/21 08:58:06.440 ERROR [dao/service.go:110] status code error: 404 '404 Not Found' 'https://krau.top/posts/(一个已删除的文章)'
2024/09/21 08:58:06.767 ERROR [dao/service.go:110] status code error: 404 '404 Not Found' 'https://krau.top/posts/(一个已删除的文章)'

似乎没有相关日志.


有什么临时修复办法吗? 能否直接手动删除多余的数据?

@qwqcode
Copy link
Member

qwqcode commented Sep 22, 2024

临修复的办法是添加环境变量 ATK_DB_MIGRATOR_FUNC_MERGE_PAGES=1,然后重启 Docker 容器会自动合并页面,然后删除环境变量。

注:在操作之前,记得备份原始数据,防止数据丢失。

@qwqcode
Copy link
Member

qwqcode commented Sep 22, 2024

可能是缓存的问题,关闭和清理缓存试试还会不会发生此现象

@qwqcode qwqcode added the bug Something isn't working label Sep 22, 2024
@krau
Copy link
Author

krau commented Sep 22, 2024

临修复的办法是添加环境变量 ATK_DB_MIGRATOR_FUNC_MERGE_PAGES=1,然后重启 Docker 容器会自动合并页面,然后删除环境变量。

注:在操作之前,记得备份原始数据,防止数据丢失。

不能正常合并

2024/09/22 23:08:29.455 FATAL [dao/migrate.go:145] Failed to insert merged pages. UNIQUE constraint failed: pages.id

@qwqcode
Copy link
Member

qwqcode commented Sep 22, 2024

试试降级到 v2.8.7 版本,然后重复 ATK_DB_MIGRATOR_FUNC_MERGE_PAGES=1 操作。记得备份。

@krau
Copy link
Author

krau commented Sep 22, 2024

试试降级到 v2.8.7 版本,然后重复 ATK_DB_MIGRATOR_FUNC_MERGE_PAGES=1 操作。记得备份。

成功了, thx

@Doradx
Copy link

Doradx commented Oct 8, 2024

已找到问题:#971 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants