Skip to content

Database not refreshed #156

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

Closed
uberneko opened this issue Jun 3, 2019 · 10 comments
Closed

Database not refreshed #156

uberneko opened this issue Jun 3, 2019 · 10 comments

Comments

@uberneko
Copy link

uberneko commented Jun 3, 2019

It may be not a bug, but I was on 3.2.0, it was working properly (except a warning/error at the beginning) - and the database was updated each time I was switching to database mode.
When downloading 3.4.0, the database would not update itself anymore.
Strangely, when running again v3.2.0, it would not update anymore too -
(I use AppImages)
Is there a way to force an update of database ? Or should I restart from scratch and rebuild the database ?

@vladimiry
Copy link
Owner

This is intended behaviour since v3.4.0, see details here #149. So the app will save the database.bin file with 10 minutes delay. You can decrease the delay if you want (possibly even setting it to 0 to force the immediate saving, I didn't try setting zero though), this #149 (comment) explains how to do that.

@vladimiry
Copy link
Owner

I think I better get back the immediate database.bin file saving by default with next release as I agree the current default behaviour looks confusing. And those who need debounced saving will need to tweak the config.json manually (normally users who have a huge database.bin file).

@vladimiry
Copy link
Owner

the database was updated each time I was switching to database mode

Just a note. When you turn off the local store option for the account the locally saved account-related data will be wiped out from the local database on the next app start which means when you turn the option back on the app will download everything from start (full bootstrap fetch cycle). So regular local store option switching is not an optimal way of using the app.

@uberneko
Copy link
Author

uberneko commented Jun 4, 2019

Hello - thank you again for your quick answers -
Sorry I was not detailed enough - I had read in the new version change decriptions that it was an intended behaviour to refresh only every 10mins (I closely follow the development of this great tool) - but the thing is I have left my computer on (locked though) for more than 10 mins (half an hour) and nothing was refreshed
The only test I have done was to turn off option of "local store" and save, but re-activated it without loggin off - so it kept the database file alive I guess
I will surely try tonight to download v3.4.1 and rebuild my (heavy) database.

@vladimiry
Copy link
Owner

@uberneko I think you might want to use the pre 3.4.2 build which gets back immediate database write by default. It also adds databaseWriteDelayMs config option which is set to 0 by default.

@uberneko
Copy link
Author

uberneko commented Jun 4, 2019

OK thanks ! Downloaded - gonna give it a try tonight -

@uberneko
Copy link
Author

uberneko commented Jun 4, 2019

pre 3.4.2 works !
Back to normal, it updates the database when switching to database mode.
I still have this error message (like before since v3.0 I would say) - but it seems to work normally anyway like before...

Unhandled Promise Rejection
Error: Failed index emails in 15000ms (mails portions size: 1000)
at MergeMapSubscriber.project (/tmp/.mount_electrwIisJ6/resources/app.asar/app/electron-main.js:2409:374)
at MergeMapSubscriber._tryNext (/tmp/.mount_electrwIisJ6/resources/app.asar/node_modules/rxjs/internal/operators/mergeMap.js:69:27)
at MergeMapSubscriber._next (/tmp/.mount_electrwIisJ6/resources/app.asar/node_modules/rxjs/internal/operators/mergeMap.js:59:18)
at MergeMapSubscriber.Subscriber.next (/tmp/.mount_electrwIisJ6/resources/app.asar/node_modules/rxjs/internal/Subscriber.js:66:18)
at AsyncAction.dispatch (/tmp/.mount_electrwIisJ6/resources/app.asar/node_modules/rxjs/internal/observable/timer.js:31:16)
at AsyncAction._execute (/tmp/.mount_electrwIisJ6/resources/app.asar/node_modules/rxjs/internal/scheduler/AsyncAction.js:71:18)
at AsyncAction.execute (/tmp/.mount_electrwIisJ6/resources/app.asar/node_modules/rxjs/internal/scheduler/AsyncAction.js:59:26)
at AsyncScheduler.flush (/tmp/.mount_electrwIisJ6/resources/app.asar/node_modules/rxjs/internal/scheduler/AsyncScheduler.js:52:32)

@vladimiry
Copy link
Owner

Error: Failed index emails in 15000ms (mails portions size: 1000)

Try doubling the indexingBootstrap value in config.json.

I'm considering increasing the default value with new versions.

@uberneko
Copy link
Author

uberneko commented Jun 4, 2019

It worked :)

@uberneko uberneko closed this as completed Jun 4, 2019
@vladimiry
Copy link
Owner

15 seconds is normally sufficient timeout to index 1000 emails (indexing buffer size). So I guess you either got a low-performance computer or most of your email messages are huge. Anyway, I'm doubling the default value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants