WayneJz / teslamate-addr-fix

To fix teslamate broken addresses caused by openstreetmap unavailability
MIT License
69 stars 7 forks source link

最近几天出现sql错误 #20

Open rockftx opened 5 months ago

rockftx commented 5 months ago

最近几天docker-compose起动后提示大量错误,不能修复地址了,teslamate其它功能正常。

teslamate-addr-fix_1 | teslamate-addr-fix_1 | 2024/06/09 09:14:50 /workspace/go/pkg/mod/gorm.io/gorm@v1.24.1-0.20221019064659-5dd2bb482755/callbacks.go:134 record not found teslamate-addr-fix_1 | [1.091ms] [rows:0] SELECT FROM "positions" WHERE id = 0 ORDER BY "positions"."id" LIMIT 1 teslamate-addr-fix_1 | teslamate-addr-fix_1 | 2024/06/09 09:14:50 /workspace/go/pkg/mod/gorm.io/gorm@v1.24.1-0.20221019064659-5dd2bb482755/callbacks.go:134 record not found teslamate-addr-fix_1 | [0.845ms] [rows:0] SELECT FROM "positions" WHERE id = 0 ORDER BY "positions"."id" LIMIT 1 teslamate-addr-fix_1 | teslamate-addr-fix_1 | 2024/06/09 09:14:50 /workspace/go/pkg/mod/gorm.io/gorm@v1.24.1-0.20221019064659-5dd2bb482755/callbacks.go:134 record not found teslamate-addr-fix_1 | [0.472ms] [rows:0] SELECT FROM "positions" WHERE id = 0 ORDER BY "positions"."id" LIMIT 1 teslamate-addr-fix_1 | teslamate-addr-fix_1 | 2024/06/09 09:14:50 /workspace/go/pkg/mod/gorm.io/gorm@v1.24.1-0.20221019064659-5dd2bb482755/callbacks.go:134 record not found teslamate-addr-fix_1 | [0.386ms] [rows:0] SELECT FROM "positions" WHERE id = 0 ORDER BY "positions"."id" LIMIT 1 teslamate-addr-fix_1 | teslamate-addr-fix_1 | 2024/06/09 09:14:50 /workspace/go/pkg/mod/gorm.io/gorm@v1.24.1-0.20221019064659-5dd2bb482755/callbacks.go:134 record not found teslamate-addr-fix_1 | [0.450ms] [rows:0] SELECT FROM "positions" WHERE id = 0 ORDER BY "positions"."id" LIMIT 1 teslamate-addr-fix_1 | teslamate-addr-fix_1 | 2024/06/09 09:14:50 /workspace/go/pkg/mod/gorm.io/gorm@v1.24.1-0.20221019064659-5dd2bb482755/callbacks.go:134 record not found teslamate-addr-fix_1 | [0.299ms] [rows:0] SELECT FROM "positions" WHERE id = 0 ORDER BY "positions"."id" LIMIT 1 teslamate-addr-fix_1 | teslamate-addr-fix_1 | 2024/06/09 09:14:50 /workspace/go/pkg/mod/gorm.io/gorm@v1.24.1-0.20221019064659-5dd2bb482755/callbacks.go:134 record not found

rockftx commented 5 months ago

我在drivers表里发现了一些只有id和start_date的数据(见图)6月有一天,5月有2天,4月有1天, 再往前也有零星的几天,不知道是怎么产生的,但是从5月下旬才开始报错,之前都可以正常修复地址。 我尝试删除了这些数据,似乎不报错了(下面日志),但是日志提示修复的这些id的start_address_id和end_address_id还是NULL。

只有id和start_date的数据 image

docker输出日志: teslamate_1 | 2024-06-09 23:23:04.722 [info] Repairing drive #4422 ... teslamate_1 | 2024-06-09 23:23:04.722 [info] OK teslamate_1 | 2024-06-09 23:23:04.723 [info] Repairing drive #4421 ... teslamate_1 | 2024-06-09 23:23:04.723 [info] OK teslamate_1 | 2024-06-09 23:23:04.723 [info] Repairing drive #4420 ... teslamate_1 | 2024-06-09 23:23:04.723 [info] OK teslamate_1 | 2024-06-09 23:23:04.723 [info] Repairing drive #4419 ... teslamate_1 | 2024-06-09 23:23:04.724 [info] OK teslamate_1 | 2024-06-09 23:23:04.724 [info] Repairing drive #4418 ... teslamate_1 | 2024-06-09 23:23:04.724 [info] OK teslamate_1 | 2024-06-09 23:23:04.724 [info] Repairing drive #4417 ... teslamate_1 | 2024-06-09 23:23:04.724 [info] OK