cookieY / Yearning

🐳 A most popular sql audit platform for mysql
http://next.yearning.io/
GNU Affero General Public License v3.0
8.43k stars 1.98k forks source link

[Question] bug-查询工单详情后提示状态码 500 #1024

Open shenxf1205 opened 5 months ago

shenxf1205 commented 5 months ago

描述问题 查询工单详情时提示 状态码 500。并且该工单里的sql语句为空

复现 有些工单偶现该bug

期望的结果 下个版本能否解决该bug

截图

报错界面

错误日志截图

部署方式

环境 (请填写环境信息):

额外的日志信息 在这里添加有关该问题的所有日志。 2024/02/19 02:37:29 ^[[32mYearning-go/src/handler/dashboard.go:54 ^[[0m^[[33m[0.412ms] ^[[34;1m[rows:7]^[[0m SELECT * FROM core_total_tickets ORDER BY date desc LIMIT 7 ^[[34m [Info] 2024-02-19 02:37:29 "url":"/api/v2/dash/banner" "method":"GET" "status":200 "protocol":"HTTP/1.1" "remote_ip":"10.254.6.65" "bytes_in": "0 bytes" "bytes_out": "590 bytes"^[[0m

"logFile.log" 7420L, 990741C github.com/cookieY/yee@v0.5.1/yee.go:132 net/http/server.go:2939 net/http/server.go:2010 runtime/asm_amd64.s:1651 ^[[0m ^[[35m [Error] 2024-03-21 16:34:39 (github.com/cookieY/yee@v0.5.1/context.go:153) /api/v2/fetch/timeline?source_id=1e795700-30aa-414f-801a-1592796ac904&work_id=55391639-4e0d-469d-a2bc-98ff8a352526 Internal Server Error^[[0m ^[[33m [Warn] 2024-03-21 16:34:39 "url":"/api/v2/fetch/timeline" "method":"GET" "status":500 "protocol":"HTTP/1.1" "remote_ip":"172.16.0.40" "bytes_in": "0 bytes" "bytes_out": "21 bytes"^[[0m ^[[34m [Info] 2024-03-21 16:34:47 "url":"/api/v2/fetch/order_state" "method":"GET" "status":200 "protocol":"HTTP/1.1" "remote_ip":"172.16.0.40" "bytes_in": "0 bytes" "bytes_out": "0 bytes"^[[0m ^[[34m [Info] 2024-03-21 16:34:47 "url":"/api/v2/fetch/comment" "method":"GET" "status":200 "protocol":"HTTP/1.1" "remote_ip":"172.16.0.40" "bytes_in": "0 bytes" "bytes_out": "0 bytes"^[[0m ^[[31m [Critical] 2024-03-21 16:34:48 (github.com/cookieY/yee@v0.5.1/middleware/recovery.go:33) [PANIC RECOVER] runtime error: index out of range [3] with length 3 Traceback: runtime/panic.go:114 Yearning-go/src/handler/fetch/fetch.go:141 Yearning-go/src/apis/fetch.go:23 github.com/cookieY/yee@v0.5.1/context.go:128 github.com/cookieY/yee@v0.5.1/middleware/gzip.go:66 github.com/cookieY/yee@v0.5.1/context.go:128 github.com/cookieY/yee@v0.5.1/middleware/recovery.go:38 github.com/cookieY/yee@v0.5.1/context.go:128 github.com/cookieY/yee@v0.5.1/middleware/logger.go:58 github.com/cookieY/yee@v0.5.1/context.go:128 github.com/cookieY/yee@v0.5.1/middleware/cors.go:96 github.com/cookieY/yee@v0.5.1/context.go:128 github.com/cookieY/yee@v0.5.1/yee.go:206 github.com/cookieY/yee@v0.5.1/yee.go:132 net/http/server.go:2939 net/http/server.go:2010 runtime/asm_amd64.s:1651 ^[[0m ^[[35m [Error] 2024-03-21 16:34:48 (github.com/cookieY/yee@v0.5.1/context.go:153) /api/v2/fetch/timeline?source_id=1e795700-30aa-414f-801a-1592796ac904&work_id=55391639-4e0d-469d-a2bc-98ff8a352526 Internal Server Error^[[0m

Issues-translate-bot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Title: [Question] bug-Prompt status code 500 after querying work order details

shenxf1205 commented 5 months ago

通过查询Yearning数据库的记录,应该是该工单重复提交导致的问题

数据库查询
JackloveJam commented 2 months ago

新版本应该解决了这个问题。

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The new version should fix this problem.

shenxf1205 commented 2 months ago

新版本应该解决了这个问题。

我目前安装的就是3.1.7 版本,已经是最新的版本了,是后续更新吗

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The new version should fix this problem.

What I currently have installed is version 3.1.7, which is already the latest version. Is it a follow-up update?

shenxf1205 commented 3 weeks ago

更新了3.1.8版本,测试了下该功能,发现只是前端界面禁止了重复提交,实际后台还是会产生有多条提交记录,一样也是会报错。。 image

image
cookieY commented 1 week ago

detail 的 work_id 本身就是可以重复的。是用来查找所有该工单 id 下的操作记录,并不唯一

Issues-translate-bot commented 1 week ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The work_id of detail itself can be repeated. It is used to find all operation records under the work order ID, which is not unique.