lingochamp / lingochamp/FileDownloader

杀进程,进度丢失bug改进反馈

Open
#1,374 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
11.1k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

经过代码调试,发现问题出在RemitDatabase代码里的freeToDBIdList.add(id); 由于多线程并发,会存在延时导致数据库里insertConnectionModel方法失效:
修改办法之一,在用到freeToDBIdList的地方都要加个同步锁
synchronized (freeToDBIdList) {
syncCacheToDB(id);
freeToDBIdList.add(id);//实际测试过程中,发现这个执行时机很迟
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing RemitDatabase uses of freeToDBIdList, especially the syncCacheToDB and insertConnectionModel flow described in the report. Check the concurrent timing around freeToDBIdList.add(id), then verify that progress remains persisted after the process is killed and that the database insertion is not skipped.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
database, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.