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

百度云文件上传后缓存里的Ctime/Mtime错误 #6370

Closed
4 tasks done
potoo0 opened this issue Apr 20, 2024 · 0 comments
Closed
4 tasks done

百度云文件上传后缓存里的Ctime/Mtime错误 #6370

potoo0 opened this issue Apr 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@potoo0
Copy link
Contributor

potoo0 commented Apr 20, 2024

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 or Operational).
    我确定是AList的问题,而不是其他原因(例如网络依赖操作)。

  • I'm sure this issue is not fixed in the latest version.
    我确定这个问题在最新版本中没有被修复。

AList Version / AList 版本

v3.33.0

Driver used / 使用的存储驱动

BaiduNetdisk

Describe the bug / 问题描述

已知情况:

  1. 百度云网页列表视图显示的 修改时间 是其 /api/list 接口的 server_mtime, 此时间是文件上传时间, 而不是通常说的文件修改时间
  2. 百度云 api 创建系列接口返回的 ctime/mtime 是文件上传时间

第二点的影响:
实际上只要涉及 mtime 的协议都会受影响, 拿 webdav 举例:

  1. 文件 mtime = 2024-04-20 13:13:36, 在当前时间 2024-04-20 13:13:37 上传
  2. 百度上传接口返回的 ctime/mtime 是文件上传时间, 假定耗时 1s 那这俩都等于 2024-04-20 13:13:38, 然后会被存放到 alist 缓存内
  3. webdav 或者 alist 前端获取文件时间会发现 ctime/mtime = 2024-04-20 13:13:38
  4. rclone sync/copy 操作 webdav 此时发现本地文件 mtime = 2024-04-20 13:13:36 不等于 alist 提供的 mtime = 2024-04-20 13:13:38, 则认为文件发生变更, 触发文件上传

临时处理:

  • 在 2 步后去页面刷新对应地址的缓存

解决方案:

  • 在 2 步后不要存缓存, 使第 3 步获取时间去请求百度接口拿真实的文件修改时间

Reproduction / 复现链接

复现过程见问题描述

Config / 配置

Logs / 日志

No response

@potoo0 potoo0 added the bug Something isn't working label Apr 20, 2024
@potoo0 potoo0 changed the title 百度云文件上传后Ctime/Mtime错误 百度云文件上传后缓存里的Ctime/Mtime错误 Apr 20, 2024
@xhofe xhofe closed this as completed in ec08ecd Apr 25, 2024
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

1 participant