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

stop working when access messages while updating feeds #41

Closed
blackarcher21 opened this issue Jul 26, 2016 · 22 comments
Closed

stop working when access messages while updating feeds #41

blackarcher21 opened this issue Jul 26, 2016 · 22 comments
Assignees
Labels
Component-DB Status-Partially-Fixed Part of bug/feature is fixed/implemented. Type-Defect This is BUG!!!
Milestone

Comments

@blackarcher21
Copy link

Brief description of the issue.

RSS Guard stop working when I access or read messages while updating feeds of a category. I use MySQL as DB storage.
RSS Guard 3.3.2
MySQL 5.6.17 (WAMP 2.5.18 x64)
Windows 8.1 x64

How to reproduce the bug?

  1. Run update on a category
  2. Access a message while it updating feeds
  3. RSS Guard stop working

What is the expected result?

no problem

What actually happened?

It stop working

Other information (logs, see Wiki)

log1.txt
log2.txt

I decided to attach 2 log from 2 attemps. Thanks

@martinrotter
Copy link
Owner

Is this 100% reproducible every time you try?

@martinrotter martinrotter added this to the 3.3.3 milestone Jul 26, 2016
@martinrotter martinrotter self-assigned this Jul 26, 2016
@blackarcher21
Copy link
Author

It's not but it happens most of time.

@martinrotter
Copy link
Owner

OK, it seems that there is clearly problem with mainly MySQL, I will have to use producer-consumer pattern and send all SQL queries to one single class to consume it all in one single thread to avoid these SQL transaction horrors.

@martinrotter
Copy link
Owner

I try to reproduce, but cannot. So you update a lot of feeds and madly clicking on messages and it crashes?

@martinrotter
Copy link
Owner

Okay, I managed it to reproduce once, will try to fix and find bug.

@martinrotter
Copy link
Owner

Does this bug happen with SQLite storage?

@blackarcher21
Copy link
Author

blackarcher21 commented Aug 3, 2016

So far, it's not reproducible with SQLite. Anyway, with MySQL, it seems can be easily make it crash by mark selected items as read/unread while updating feeds.

@martinrotter
Copy link
Owner

Yes yes, I managed to make it crash too. I know where the core of the problem might be. I will try to think about fix. The goal is to allow multi-thread access to DB so that user can view messages when updating feeds.

@martinrotter
Copy link
Owner

I will fix this this way:

  1. All SQL operations when downloading new messages will be done in one single batch transaction. This will have two impacts:
    • When you update for example 10 feeds, all new messages from those feeds will get downloaded first and then all of them will be inserted into SQL at once. So if you update 10 feeds, you will see new messages after all feeds are updated.
    • This approach might bring another noticeable speed improvement, particularly when number of new messages will be high.
    • This approach will also lower SQL/HDD throttling.
  2. All SQL operations in separate thread (feed updating) will have unique separated database connections.

@martinrotter martinrotter modified the milestones: 3.3.4, 3.3.3 Aug 10, 2016
martinrotter added a commit that referenced this issue Aug 23, 2016
@martinrotter
Copy link
Owner

martinrotter commented Aug 23, 2016

This should be fixed, please test it. Use latest code from [dev] branch.

@martinrotter martinrotter added the Status-Fixed Ticket is resolved. label Aug 23, 2016
@blackarcher21
Copy link
Author

could you upload please? resumable link if possible. thanks.

@martinrotter
Copy link
Owner

Will upload test release for you tomorrow maybe.

@blackarcher21
Copy link
Author

just updated to v3.3.4, but I can test for this because RSS Guard is not responsive when updating feeds, but feeds successfully updated. I wonder it is because DB size

here is the log file (no feeds updated in this log because they were updated on previous run)
log.txt

@martinrotter
Copy link
Owner

Yea, problem is that I moved some DB updating code to main UI thread, which results in app UI thread freezing. I will move the code to feed downloader thread in 3.3.5.

@martinrotter martinrotter reopened this Aug 30, 2016
@martinrotter martinrotter added Status-Partially-Fixed Part of bug/feature is fixed/implemented. and removed Status-Fixed Ticket is resolved. labels Aug 30, 2016
@martinrotter
Copy link
Owner

I made some tweak to make sure that RSS Guard main windows is more responsive during updates. You can get latest automatically compiled development release here (It will compile for 15 minutes, so wait 15 minutes from time I post this.).

Let me know if it is better.

@martinrotter
Copy link
Owner

@blackarcher21
Copy link
Author

Hi, thanks for kindly fix the issue. I'm sorry can't test and give feedback, my network connection doesn't look good so got three times timeout already, will try again later.

@blackarcher21
Copy link
Author

could you upload with resumable link? I have problems when donwloading from these link. It always stop in the middle of process and I need to start again from beginning which is waste lot of my data. Sorry for asking much.

@martinrotter
Copy link
Owner

Don't you have working internet connection? No, I can't I already setup this automatic build machinery, partly for you brother, since you always ask for installers.

@blackarcher21
Copy link
Author

Yes, I do but not good enough stability for download. Okay, fine. Thank you. :)

@blackarcher21
Copy link
Author

I can tell that this problem is fixed with newer version. Thanks.

@martinrotter
Copy link
Owner

Okay, perfectos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component-DB Status-Partially-Fixed Part of bug/feature is fixed/implemented. Type-Defect This is BUG!!!
Projects
None yet
Development

No branches or pull requests

2 participants