Skip to content

feat(core): avoid race conditions when writing temp files#1674

Merged
Mister-Hope merged 2 commits intovuepress:mainfrom
pengzhanbo:write-temp
Feb 2, 2026
Merged

feat(core): avoid race conditions when writing temp files#1674
Mister-Hope merged 2 commits intovuepress:mainfrom
pengzhanbo:write-temp

Conversation

@pengzhanbo
Copy link
Copy Markdown
Member

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Provide a description in this PR that addresses what the PR is solving. If this PR is going to solve an existing issue, please reference the issue (e.g. close #123).

What is the purpose of this pull request?

  • Bug fix
  • New feature
  • Documentation update
  • Other

Description

  • Avoid duplicate writes of the same content through content hashing to reduce unnecessary disk operations.
  • Use a queue mechanism to ensure concurrent writes to the same file are executed sequentially, preventing race conditions.
  • Skip writes of intermediate states and only retain the latest content updates.

Screenshots

Before

After

@coveralls
Copy link
Copy Markdown

coveralls commented Feb 2, 2026

Pull Request Test Coverage Report for Build 21579971014

Details

  • 18 of 18 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.6%) to 74.045%

Totals Coverage Status
Change from base Build 19128283464: 0.6%
Covered Lines: 700
Relevant Lines: 945

💛 - Coveralls

@Mister-Hope Mister-Hope merged commit d89ac9f into vuepress:main Feb 2, 2026
30 checks passed
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.

3 participants