Merge lp:~huxuan/gtg/bug-907676 into lp:~gtg/gtg/old-trunk
Status: | Rejected |
---|---|
Rejected by: | Izidor Matušov |
Proposed branch: | lp:~huxuan/gtg/bug-907676 |
Merge into: | lp:~gtg/gtg/old-trunk |
Diff against target: |
97 lines (+30/-7) 2 files modified
GTG/backends/backend_localfile.py (+28/-7) GTG/tests/test_backends.py (+2/-0) |
To merge this branch: | bzr merge lp:~huxuan/gtg/bug-907676 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Izidor Matušov | Disapprove | ||
Xuan (Sean) Hu (community) | Needs Resubmitting | ||
Review via email: mp+103529@code.launchpad.net |
Description of the change
It's a trial to solve bug #907676.
Welcome to any suggestions or criticism.
Feel free to comment your opinion down
Unmerged revisions
- 1189. By Xuan (Sean) Hu
-
make sleep with 2 sec to avoid potential make check error
- 1188. By Xuan (Sean) Hu
-
merge from lp:gtg
- 1187. By Xuan (Sean) Hu
-
revise according to izidor's comment:
1) backend_
localfile. py: remove redundant savexml, reduce timer interval
2) test_backends.py: add time.sleep to wait timer so as to pass the test - 1186. By Xuan (Sean) Hu
-
merge from lp:gtg
- 1185. By Xuan (Sean) Hu
-
Merge from lp:gtg
- 1184. By Xuan (Sean) Hu
-
backend_
localfile. py 1) remove self.timer_exist for simplier code
- 1183. By Xuan (Sean) Hu
-
backend_
localfile. py 1) bug fix for error indent
- 1182. By Xuan (Sean) Hu
-
backend_
localfile. py 1) silly logical error.
- 1181. By Xuan (Sean) Hu
-
backend_
localfile. py 1) silly repo error (thanks to pylint)
2) docstring revise - 1180. By Xuan (Sean) Hu
-
backend_
localfile. py 1) revised for silly logical error
Your solution looks good and should work in the most of the situation. You might not get right this kind of situation:
" You get many requests in 20 seconds. You filter them because it is in burst. But then you have no save requests for long time like 30 minutes. Afterwards GTG crashes or user turn off the computer without closing GTG - the changes in the first 20 seconds are lost. "
Do you see that usecase? I propose to solve this bug by creating a timer which save XML and then timer is deleted. If the timer exists, save action is thrown away (it is already going to be saved). You might need to add locks to prevent modification of XML while saving XML.