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

如何获得文件信息? #7

Open
perfgao opened this issue Feb 10, 2017 · 4 comments
Open

如何获得文件信息? #7

perfgao opened this issue Feb 10, 2017 · 4 comments

Comments

@perfgao
Copy link

perfgao commented Feb 10, 2017

Hi,

我注意到模块中没有相关的get file info 接口,要是想获得文件信息,比如文件的大小,该如何操作呢?
@0312birdzhang
Copy link

+1
楼主找到方法了吗?

@0312birdzhang
Copy link

在这里找到了
https://github.com/ymyang/lua-fdfs/blob/30f855d16d252cab187446976986f097511d6db6/lib/fastdfs/storage.lua#L353-L364

@perfgao
Copy link
Author

perfgao commented Oct 29, 2019

我当时对这个方法造了轮子 /笑哭,你最近在用fasfdfs?

@0312birdzhang
Copy link

@perfgao 很早之前有了解过,我们上传部分是用java的fastdfs clien实现的,下载是nginx_fastdfs模块,lua查询数据库保存的patch甩过去。最近有些大文件(2G左右),在主从同步有延迟的情况下被下载,导致跑到还没同步完的group上下载了,导致下载下来的文件不全。由于是分片上传的,200M一片,所以才有这个问题,但是又没办法避免(测试人员点的太快了,并且服务器之间同步说不准差多少秒)。
想通过下载去校验一下数据库中的大小跟fastdfs获取的大小是否一致。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants