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

Fix favicon being cleared by web archive snapshot task #405

Merged
merged 1 commit into from
Jan 22, 2023

Conversation

sissbruecker
Copy link
Owner

With the introduction of the favicon background task, adding a bookmark can result in running both, the web archive snapshot task, and the favicon task in parallel. Both load the bookmark at the start of the task, then do their own processing, and then save the bookmark at the end. This could result in one task overriding the updated data of the other task, as the bookmark instance was not refreshed at the end of the task, before saving it. From testing this usually results in the favicon being cleared by the snapshot task, as the snapshot task takes longer.

Refreshing the bookmark would ideally wrap refreshing and saving the bookmark in a transaction, however that sporadically results in database locked errors with Sqlite. Instead this fix involves only updating the field that is relevant to each task.

@sissbruecker sissbruecker merged commit 6b46641 into master Jan 22, 2023
@sissbruecker sissbruecker deleted the fix/ensure_tasks_do_not_save_stale_data branch January 22, 2023 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant