-
Notifications
You must be signed in to change notification settings - Fork 2.2k
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
关于350M左右的文件下载过程中会重新下载的问题,已补充日志 #761
Milestone
Comments
找到原因了,似乎是因为强制归零了? DownloadLaunchRunnable#buildFirstConnectProfile
if (isMultiConnection && !supportSeek) {
// can't support seek for multi-connection is fatal problem, so discard resume.
offset = 0; |
这个是当且仅当上一次下载是 分块下载( 上面的警告的flush失败的logcat是正常情况。 |
flush失败这个确认应该是没有影响,但是在sockettimeout后重新下载时,进度会归零,以下是新的日志 09-13 17:53:27.191 27159-28602/com.liulishuo.filedownloader.demo D/FileDownloader.FileDownloadMessenger: notify error 461854951@com.liulishuo.filedownloader.DownloadTask@543fca1 java.net.SocketTimeoutException
09-13 17:53:27.191 27159-28602/com.liulishuo.filedownloader.demo V/FileDownloader.DownloadTaskHunter: filedownloader:lifecycle:over com.liulishuo.filedownloader.DownloadTaskHunter@3a71cec6 by -1
09-13 17:53:27.420 28019-28609/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: database.updateConnectionModel
09-13 17:53:27.421 28019-28609/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: require sync id[461854951] index[4] offset[283945752], consume[13]
09-13 17:53:27.549 28019-28053/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloadApplication: drawUpEachThreadInfoDiff: Thread count = 19. Thread differ : -1. unknown: -1 [(-)source-status-callback]
09-13 17:53:27.550 28019-28053/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloadApplication: drawUpEachThreadSizeDiff: Thread count = 19. Thread differ : -1. unknown: -1 [(-)source-status-callback]
09-13 17:53:27.551 28019-28053/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloadApplication: drawUpEachThreadSize: Thread count = 19. OkHttp: 1 | Binder: 2 | Network: 1 | FlowSingle: 1 | unknown: 14
09-13 17:53:27.559 28019-28609/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: database.updateConnectionModel
09-13 17:53:27.559 28019-28609/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: require sync id[461854951] index[4] offset[283945752], consume[18]
09-13 17:53:27.645 28019-28608/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: database.updateConnectionModel
09-13 17:53:27.646 28019-28608/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: require sync id[461854951] index[3] offset[213721679], consume[11]
09-13 17:53:27.823 28019-28608/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: database.updateConnectionModel
09-13 17:53:27.823 28019-28608/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: require sync id[461854951] index[3] offset[213721679], consume[12]
09-13 17:53:30.283 28019-28607/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: database.updateConnectionModel
09-13 17:53:30.283 28019-28607/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: require sync id[461854951] index[2] offset[141294818], consume[17]
09-13 17:53:30.398 28019-28607/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: database.updateConnectionModel
09-13 17:53:30.398 28019-28607/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: require sync id[461854951] index[2] offset[141294818], consume[17]
09-13 17:53:33.348 27159-27209/com.liulishuo.filedownloader.demo D/FileDownloadApplication: drawUpEachThreadInfoDiff: Thread count = 16. Thread differ : -1. FlowSingle: -1 [(-)FileDownloader-Flow-02]
09-13 17:53:33.349 27159-27209/com.liulishuo.filedownloader.demo D/FileDownloadApplication: drawUpEachThreadSizeDiff: Thread count = 16. Thread differ : -1. FlowSingle: -1
09-13 17:53:33.349 27159-27209/com.liulishuo.filedownloader.demo D/FileDownloadApplication: drawUpEachThreadSize: Thread count = 16. Binder: 3 | unknown: 13
09-13 17:53:33.572 28019-28053/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloadApplication: drawUpEachThreadInfoDiff: Thread count = 15. Thread differ : -4. FlowSingle: -1 [(-)FileDownloader-Flow-02] | unknown: -3 [(-)FileDownloader-download-executor2, (-)FileDownloader-download-executor4, (-)FileDownloader-download-executor5]
09-13 17:53:33.573 28019-28053/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloadApplication: drawUpEachThreadSizeDiff: Thread count = 15. Thread differ : -4. FlowSingle: -1 | unknown: -3 [(-)FileDownloader-download-executor2, (-)FileDownloader-download-executor4, (-)FileDownloader-download-executor5]
09-13 17:53:33.573 28019-28053/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloadApplication: drawUpEachThreadSize: Thread count = 15. OkHttp: 1 | Binder: 2 | Network: 1 | unknown: 11
09-13 17:53:35.578 28019-28053/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloadApplication: drawUpEachThreadInfoDiff: Thread count = 14. Thread differ : -1. unknown: -1 [(-)FileDownloader-download-executor3]
09-13 17:53:35.579 28019-28053/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloadApplication: drawUpEachThreadSizeDiff: Thread count = 14. Thread differ : -1. unknown: -1 [(-)FileDownloader-download-executor3]
09-13 17:53:35.580 28019-28053/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloadApplication: drawUpEachThreadSize: Thread count = 14. OkHttp: 1 | Binder: 2 | Network: 1 | unknown: 10
09-13 17:53:38.296 28019-28605/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: database.updateConnectionModel
09-13 17:53:38.297 28019-28605/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: require sync id[461854951] index[0] offset[488560], consume[17]
09-13 17:53:38.299 28019-28079/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.DownloadLaunchRunnable: finish sub-task for [461854951] TRUE FALSE
09-13 17:53:38.299 28019-28079/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.DownloadLaunchRunnable: finish sub-task for [461854951] TRUE FALSE
09-13 17:53:38.300 28019-28079/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.DownloadLaunchRunnable: finish sub-task for [461854951] TRUE FALSE
09-13 17:53:38.300 28019-28079/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.DownloadLaunchRunnable: finish sub-task for [461854951] TRUE FALSE
09-13 17:53:38.301 28019-28079/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.DownloadLaunchRunnable: finish sub-task for [461854951] TRUE FALSE
09-13 17:53:43.233 27159-27159/com.liulishuo.filedownloader.demo D/FileDownloader.DownloadTask: setListener com.liulishuo.filedownloader.demo.HybridTestActivity$3@2876a0b2
09-13 17:53:43.234 27159-27159/com.liulishuo.filedownloader.demo D/FileDownloader.DownloadTask: setTag 1
09-13 17:53:43.234 27159-27159/com.liulishuo.filedownloader.demo V/FileDownloader.DownloadTaskHunter: call start Url[http://imtt.dd.qq.com/16891/D5C206B2E152D565B05E086800B7DC99.apk], Path[null] Listener[com.liulishuo.filedownloader.demo.HybridTestActivity$3@2876a0b2], Tag[1]
09-13 17:53:43.270 27159-27159/com.liulishuo.filedownloader.demo D/FileDownloader.DownloadTask: setPath /storage/emulated/0/Android/data/com.liulishuo.filedownloader.demo/cache/0d5a0dbebb52028fcf85d5cb5b9b8e7e
09-13 17:53:43.271 27159-27159/com.liulishuo.filedownloader.demo D/FileDownloader.DownloadTaskHunter: save Path is null to /storage/emulated/0/Android/data/com.liulishuo.filedownloader.demo/cache/0d5a0dbebb52028fcf85d5cb5b9b8e7e
09-13 17:53:43.273 27159-27159/com.liulishuo.filedownloader.demo V/FileDownloader.DownloadTaskHunter: the task[461854951] has been into the launch pool.
09-13 17:53:43.282 27159-30013/com.liulishuo.filedownloader.demo D/FileDownloader.FileDownloadMessenger: notify begin 461854951@com.liulishuo.filedownloader.DownloadTask@1dd31380
09-13 17:53:43.282 27159-30013/com.liulishuo.filedownloader.demo V/FileDownloader.DownloadTaskHunter: filedownloader:lifecycle:start com.liulishuo.filedownloader.DownloadTaskHunter@17d07db9 by 11
09-13 17:53:43.282 27159-30013/com.liulishuo.filedownloader.demo V/FileDownloader.FileDownloadList: add list in all 461854951@com.liulishuo.filedownloader.DownloadTask@1dd31380 11 1
09-13 17:53:43.286 28019-28036/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FileDownloadManager: request start the task with url(http://imtt.dd.qq.com/16891/D5C206B2E152D565B05E086800B7DC99.apk) path(/storage/emulated/0/Android/data/com.liulishuo.filedownloader.demo/cache/0d5a0dbebb52028fcf85d5cb5b9b8e7e) isDirectory(FALSE)
09-13 17:53:43.287 28019-28036/com.liulishuo.filedownloader.demo:filedownloader E/FileDownloader.FileDownloadManager: 461854951 status is[3](not finish) & but not in the pool
09-13 17:53:43.326 28019-30015/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.String: test_ isMultiConnection = false supportSeek = true model = id[461854951], url[http://imtt.dd.qq.com/16891/D5C206B2E152D565B05E086800B7DC99.apk], path[/storage/emulated/0/Android/data/com.liulishuo.filedownloader.demo/cache/0d5a0dbebb52028fcf85d5cb5b9b8e7e], status[6], sofar[0], total[0], etag[null], com.liulishuo.filedownloader.model.FileDownloadModel@238e57a8connectionCount = 1
09-13 17:53:43.327 27159-30017/com.liulishuo.filedownloader.demo D/FileDownloader.MessageSnapshotGate: ~~~callback 461854951 old[11] new[1] 1
09-13 17:53:43.327 28019-30015/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FileDownloadUtils: can't continue 461854951 the downloaded-record is zero.
09-13 17:53:43.328 28019-30015/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.String: isBreakpointAvailable false
09-13 17:53:43.329 27159-30017/com.liulishuo.filedownloader.demo D/FileDownloader.FileDownloadMessenger: notify pending 461854951@com.liulishuo.filedownloader.DownloadTask@1dd31380
09-13 17:53:43.329 28019-30015/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FileDownloadUtils: can't continue 461854951 the downloaded-record is zero.
09-13 17:53:43.329 27159-30017/com.liulishuo.filedownloader.demo D/FileDownloader.MessageSnapshotGate: ~~~callback 461854951 old[1] new[6] 1
09-13 17:53:43.330 27159-30017/com.liulishuo.filedownloader.demo D/FileDownloader.FileDownloadMessenger: notify started 461854951@com.liulishuo.filedownloader.DownloadTask@1dd31380
09-13 17:53:43.330 28019-30015/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.String: buildFirstConnectProfile isResumeAvailableOnDB = false
09-13 17:53:43.354 28019-30015/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.ConnectTask: 461854951 request header {Range=[bytes=0-]}
09-13 17:53:43.381 27159-27209/com.liulishuo.filedownloader.demo D/FileDownloadApplication: drawUpEachThreadInfoDiff: Thread count = 18. Thread differ : +2. FlowSingle: +1 [(+)FileDownloader-Flow-03] | LauncherTask: +1 [(+)FileDownloader-LauncherTask3]
09-13 17:53:43.382 27159-27209/com.liulishuo.filedownloader.demo D/FileDownloadApplication: drawUpEachThreadSizeDiff: Thread count = 18. Thread differ : +2. FlowSingle: +1 | LauncherTask: +1
09-13 17:53:43.382 27159-27209/com.liulishuo.filedownloader.demo D/FileDownloadApplication: drawUpEachThreadSize: Thread count = 18. Binder: 3 | FlowSingle: 1 | LauncherTask: 1 | unknown: 13
09-13 17:53:43.473 28019-30015/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FileDownloadUtils: etag find null for task(461854951)
09-13 17:53:43.544 28019-30015/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.String: -----------checkupBeforeFetch------------
09-13 17:53:43.545 27159-30017/com.liulishuo.filedownloader.demo D/FileDownloader.MessageSnapshotGate: ~~~callback 461854951 old[6] new[2] 1
09-13 17:53:43.546 27159-30017/com.liulishuo.filedownloader.demo D/FileDownloader.FileDownloadMessenger: notify connected 461854951@com.liulishuo.filedownloader.DownloadTask@1dd31380
09-13 17:53:43.556 28019-30015/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.String: isMultiConnectionAvailable() = true
09-13 17:53:43.557 28019-30015/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.String: isResumeAvailableOnDB = false
09-13 17:53:43.611 28019-28053/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloadApplication: drawUpEachThreadInfoDiff: Thread count = 15. Thread differ : +1. Network: SWAP [(+)FileDownloader-Network2, (-)FileDownloader-Network1] | FlowSingle: +1 [(+)FileDownloader-Flow-03] | unknown: SWAP [(+)source-status-callback, (-)FileDownloader-download-executor1]
09-13 17:53:43.612 28019-28053/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloadApplication: drawUpEachThreadSizeDiff: Thread count = 15. Thread differ : +1. FlowSingle: +1 | unknown: SWAP [(+)source-status-callback, (-)FileDownloader-download-executor1]
09-13 17:53:43.613 28019-28053/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloadApplication: drawUpEachThreadSize: Thread count = 15. OkHttp: 1 | Binder: 2 | Network: 1 | FlowSingle: 1 | unknown: 10
09-13 17:53:43.671 28019-30015/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.DownloadLaunchRunnable: fetch data with multiple connection(count: [5]) for task[461854951]
09-13 17:53:43.671 28019-30015/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.DownloadLaunchRunnable: enable multiple connection: id[461854951] index[0] range[0, 70645948) current offset(0)
09-13 17:53:43.672 28019-30015/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.DownloadLaunchRunnable: enable multiple connection: id[461854951] index[1] range[70645949, 141291897) current offset(70645949)
09-13 17:53:43.673 28019-30015/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.DownloadLaunchRunnable: enable multiple connection: id[461854951] index[2] range[141291898, 211937846) current offset(141291898)
09-13 17:53:43.674 28019-30015/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.DownloadLaunchRunnable: enable multiple connection: id[461854951] index[3] range[211937847, 282583795) current offset(211937847)
09-13 17:53:43.674 28019-30015/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.DownloadLaunchRunnable: enable multiple connection: id[461854951] index[4] range[282583796, 0) current offset(282583796)
09-13 17:53:43.687 28019-30040/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.ConnectTask: 461854951 request header {Range=[bytes=282583796-]}
09-13 17:53:43.688 28019-30038/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.ConnectTask: 461854951 request header {Range=[bytes=141291898-211937846]}
09-13 17:53:43.691 28019-30036/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.ConnectTask: 461854951 request header {Range=[bytes=0-70645948]}
09-13 17:53:43.698 28019-30037/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.ConnectTask: 461854951 request header {Range=[bytes=70645949-141291897]}
09-13 17:53:43.698 28019-30039/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.ConnectTask: 461854951 request header {Range=[bytes=211937847-282583795]}
09-13 17:53:43.798 28019-30036/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.DownloadRunnable: the connection[0] for 461854951, is connected range[0, 70645948) current offset[0] with code[206]
09-13 17:53:43.799 28019-30036/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: -------------start fetch-------------
09-13 17:53:43.801 28019-30036/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: start fetch(0): range [0, 70645948), seek to[0]
09-13 17:53:43.805 27159-30017/com.liulishuo.filedownloader.demo D/FileDownloader.MessageSnapshotGate: ~~~callback 461854951 old[2] new[3] 1
09-13 17:53:43.806 27159-30017/com.liulishuo.filedownloader.demo D/FileDownloader.FileDownloadMessenger: notify progress 461854951@com.liulishuo.filedownloader.DownloadTask@1dd31380 1460 353229748
09-13 17:53:43.839 28019-30040/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.DownloadRunnable: the connection[4] for 461854951, is connected range[282583796, 0) current offset[282583796] with code[206]
09-13 17:53:43.839 28019-30040/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: -------------start fetch-------------
09-13 17:53:43.844 28019-30040/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: start fetch(4): range [282583796, 0), seek to[282583796]
09-13 17:53:43.872 28019-30040/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: database.updateConnectionModel
09-13 17:53:43.873 28019-30040/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: require sync id[461854951] index[4] offset[282585256], consume[26]
09-13 17:53:43.939 28019-30038/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.DownloadRunnable: the connection[2] for 461854951, is connected range[141291898, 211937846) current offset[141291898] with code[206]
09-13 17:53:43.941 28019-30038/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: -------------start fetch-------------
09-13 17:53:43.947 27159-30017/com.liulishuo.filedownloader.demo D/FileDownloader.MessageSnapshotGate: ~~~callback 461854951 old[3] new[3] 1
09-13 17:53:43.948 27159-30017/com.liulishuo.filedownloader.demo D/FileDownloader.FileDownloadMessenger: notify progress 461854951@com.liulishuo.filedownloader.DownloadTask@1dd31380 37676 353229748
09-13 17:53:43.950 28019-30038/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: start fetch(2): range [141291898, 211937846), seek to[141291898]
09-13 17:53:43.977 28019-30038/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: database.updateConnectionModel
09-13 17:53:43.977 28019-30038/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: require sync id[461854951] index[2] offset[141295994], consume[25]
09-13 17:53:44.058 28019-30039/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.DownloadRunnable: the connection[3] for 461854951, is connected range[211937847, 282583795) current offset[211937847] with code[206]
09-13 17:53:44.059 28019-30039/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: -------------start fetch-------------
09-13 17:53:44.065 27159-30017/com.liulishuo.filedownloader.demo D/FileDownloader.MessageSnapshotGate: ~~~callback 461854951 old[3] new[3] 1
09-13 17:53:44.065 27159-30017/com.liulishuo.filedownloader.demo D/FileDownloader.FileDownloadMessenger: notify progress 461854951@com.liulishuo.filedownloader.DownloadTask@1dd31380 74460 353229748
09-13 17:53:44.066 28019-30039/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: start fetch(3): range [211937847, 282583795), seek to[211937847]
09-13 17:53:44.088 28019-30039/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: database.updateConnectionModel
09-13 17:53:44.089 28019-30039/com.liulishuo.filedownloader.demo:filedownloader D/FileDownloader.FetchDataTask: require sync id[461854951] index[3] offset[211941943], consume[20] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
上次因为未提供相应的日志,直接提了issue,非常抱歉。
这次提供相应的日志,具体表现为暂停后,或者网络不稳定后,重新start任务,直接下载进度会从0开始。
The text was updated successfully, but these errors were encountered: