You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hello @, this issue was closed due to inactive more than 52 days. You can reopen or recreate it if you think it should continue. Thank you for your contributions again.
Please make sure of the following things
I have read the documentation.
我已经阅读了文档。
I'm sure there are no duplicate issues or discussions.
我确定没有重复的issue或讨论。
I'm sure it's due to
AList
and not something else(such as Network ,Dependencies
orOperational
).我确定是
AList
的问题,而不是其他原因(例如网络,依赖
或操作
)。I'm sure this issue is not fixed in the latest version.
我确定这个问题在最新版本中没有被修复。
AList Version / AList 版本
v3.35.0
Driver used / 使用的存储驱动
123pan
Describe the bug / 问题描述
这个问题之前有人提出过,但是当时认为是缓存问题
希望可以在页面上手动清理缓存
这里在描述一次,复现步骤如下:
Reproduction / 复现链接
问题已经定位到了,原因如下:
func LoadAllStorages(c *gin.Context) { storages, err := db.GetEnabledStorages() if err != nil { log.Errorf("failed get enabled storages: %+v", err) common.ErrorResp(c, err, 500, true) return } conf.StoragesLoaded = false go func(storages []model.Storage) { //这里的更新逻辑是:先卸载存储,再挂载 //而storages是从数据库获取的,这就意味着,A服务删除了存储F,在B服务更新时, //只会更新存在的,而F不在数据库中,也就不会动F,所以更新后,F依然存在storagesMap中 //A中新增存储F时,B中更新会先从storagesMap中查询F的挂载目录,查询不到,直接报错…… //这个逻辑有问题,本身就是要更新storagesMap,却使用了旧的storagesMap查询…… for _, storage := range storages { storageDriver, err := op.GetStorageByMountPath(storage.MountPath) if err != nil { log.Errorf("failed get storage driver: %+v", err) continue } // drop the storage in the driver if err := storageDriver.Drop(context.Background()); err != nil { log.Errorf("failed drop storage: %+v", err) continue } if err := op.LoadStorage(context.Background(), storage); err != nil { log.Errorf("failed get enabled storages: %+v", err) continue } log.Infof("success load storage: [%s], driver: [%s]", storage.MountPath, storage.Driver) } conf.StoragesLoaded = true }(storages) common.SuccessResp(c) }
Config / 配置
无
Logs / 日志
[GIN] 2024/07/21 - 02:43:16 | 200 | 28.722787ms | 192.168.31.40 | POST "/api/admin/storage/load_all"
�[36mINFO�[0m[2024-07-21 02:43:17] success load storage: [/123pan4764], driver: [123Pan]
�[36mINFO�[0m[2024-07-21 02:43:17] success load storage: [/crypt123pan4764], driver: [Crypt]
�[36mINFO�[0m[2024-07-21 02:43:18] success load storage: [/baidubdusername], driver: [BaiduNetdisk]
�[36mINFO�[0m[2024-07-21 02:43:18] success load storage: [/baiduluopo], driver: [BaiduNetdisk]
�[36mINFO�[0m[2024-07-21 02:43:18] success load storage: [/cryptBdLp], driver: [Crypt]
�[36mINFO�[0m[2024-07-21 02:43:19] success load storage: [/123panlu], driver: [123Pan]
�[36mINFO�[0m[2024-07-21 02:43:19] success load storage: [/crypt123panlu], driver: [Crypt]
�[36mINFO�[0m[2024-07-21 02:43:19] success load storage: [/local_us], driver: [Local]
�[31mERRO�[0m[2024-07-21 02:43:19] failed get storage driver: no mount path for an storage is: /ali
github.com/alist-org/alist/v3/internal/op.GetStorageByMountPath
/home/sfy/work/alist/internal/op/storage.go:37
github.com/alist-org/alist/v3/server/handles.LoadAllStorages.func1
/home/sfy/work/alist/server/handles/storage.go:135
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1650
The text was updated successfully, but these errors were encountered: