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

Post Processor: about race condition #4430

Closed
5 tasks done
SukkaW opened this issue Jul 19, 2020 · 4 comments · Fixed by #4791
Closed
5 tasks done

Post Processor: about race condition #4430

SukkaW opened this issue Jul 19, 2020 · 4 comments · Fixed by #4791

Comments

@SukkaW
Copy link
Member

SukkaW commented Jul 19, 2020

Check List

Please check followings before submitting a new issue.

  • I have already read Docs page & Troubleshooting page
  • I have already searched existing issues and they are not help to me
  • I examined error or warning messages and it's difficult to solve
  • Using the latest version of Hexo (run hexo version to check)
  • Node.js is higher than 8.6.0

Question

According to 9ba40f4

Parallel processing and parallel generating may cause race conditions. We have to solve this in warehouse.

And in 9ba40f4#diff-18267fb4b13330715876832e13d9697fR83 it says:

FIXME: Data may be inserted when reading files. Load it again to prevent race condition. We have to solve this in warehouse.

@tommy351 Would you mind providing information about "race condition" and how to trigger it? I have no idea about how to reproduce it and don't know which warehouse function is the culprit.

Others

By removing the line const doc = Page.findOne({source: path}); the generation speed is about 20% faster.

@tommy351
Copy link
Member

I don't remember the detail at this moment. It may be related to file watch I guessed? I will try to look into the source code later.

@SukkaW
Copy link
Member Author

SukkaW commented Jul 19, 2020

@tommy351 Thanks very much!

@github-actions
Copy link

This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Dec 30, 2020
@SukkaW
Copy link
Member Author

SukkaW commented Dec 31, 2020

unstale

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

Successfully merging a pull request may close this issue.

3 participants