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
9k stars 1.98k forks source link

file: storage_dio.c line: 711 modify file: xxxx fail 导致 fastdfs-java-client Socket Read Time out #668

Closed ql2023 closed 10 months ago

ql2023 commented 11 months ago

分片上传经常性传一半就报 file: storage_dio.c line: 711 modify file: xxxx fail,导致 fastdfs-java-client Socket Read Time out, 可能是什么原因呢?有人遇到过吗?

非并发分片上传,正常的顺序分片上传。

void dio_modify_finish_clean_up(struct fast_task_info *pTask)
{
    StorageFileContext *pFileContext;

    pFileContext = &(((StorageClientInfo *)pTask->arg)->file_context);
    if (pFileContext->fd > 0)
    {
        /* if file does not write to the end, log error info
                */
        if (pFileContext->offset >= pFileContext->start && \
            pFileContext->offset < pFileContext->end)
        {
            logError("file: "__FILE__", line: %d, " \
                "client ip: %s, modify file: %s fail", \
                __LINE__, pTask->client_ip, \
                pFileContext->filename);
        }

        close(pFileContext->fd);
        pFileContext->fd = -1;
    }
}
ql2023 commented 11 months ago

{Z%FO@OHLVNX31WF$8 %64O

FastDFS: 6.9.4 fastdfs-java-client: 1.30

ql2023 commented 10 months ago

通过过append代替modify临时解决,后续有时间再跟进了。