happyfish100 / fastdfs

FastDFS is an open source high performance distributed file system (DFS). It's major functions include: file storing, file syncing and file accessing, and design for high capacity and load balance. Wechat/Weixin public account (Chinese Language): fastdfs
GNU General Public License v3.0
8.91k stars 1.97k forks source link

分布式部署,较高频率出现上传之后下载内容为空 #709

Open weizhaokang opened 1 month ago

weizhaokang commented 1 month ago

一共两个节点,一个group。 场景:上传之后马上用返回的path下载。 错误现象:现在内容为空, 接收下载请求的storage日志中,警告信息 WARNING - file: storage_service.c, line: 7291, client ip: x.x.x.x, logic file: 文件路径 not exist . 查看两个服务器的文件,都存在,创建时间差距在1秒以内。怀疑服务器时间不同步,手工同步后仍然存在问题。 尝试将tracker.conf 中 download_server 配置为1规避问题,只从upload server中下载,仍然存在问题,似乎该配置没有生效。

weizhaokang commented 1 month ago

补充: 在客户端代码中 , 写死ip地址创建storageServer,没有出现这个问题,个人倾向下载过程中tracker选择storage出现了问题, 但不确定是环境问题还是代码问题

happyfish100 commented 1 month ago

尝试将tracker.conf 中 download_server 配置为1规避问题,只从upload server中下载,仍然存在问题,似乎该配置没有生效。

设置后要重启 tracker server才会生效。

weizhaokang commented 1 month ago

尝试将tracker.conf 中 download_server 配置为1规避问题,只从upload server中下载,仍然存在问题,似乎该配置没有生效。

设置后要重启 tracker server才会生效。

修改配置文件后试过重启和关闭之后再次启动,都会继续出现从另一台服务器下载内容为空的情况。

happyfish100 commented 1 month ago

你要通过标准的API 下载,下载时不要自己指定 storage server。