Skip to content

Fix: overlapping document parse race that can clear chunks#13900

Merged
asiroliu merged 3 commits intoinfiniflow:mainfrom
6ba3i:fix/parse-race
Apr 2, 2026
Merged

Fix: overlapping document parse race that can clear chunks#13900
asiroliu merged 3 commits intoinfiniflow:mainfrom
6ba3i:fix/parse-race

Conversation

@6ba3i
Copy link
Copy Markdown
Contributor

@6ba3i 6ba3i commented Apr 2, 2026

What problem does this PR solve?

This PR fixes a race in batch document parsing where overlapping parse requests for the same document could clear/rewrite chunk state and make previously parsed content appear lost. It adds an atomic per-document parse guard so only one parse can run at a time for that document (Fixes #13864 ).

Type of change

  • Bug Fix (non-breaking change which fixes an issue)

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. 🐖api The modified files are located under directory 'api/apps/sdk' 🐞 bug Something isn't working, pull request that fix bug. labels Apr 2, 2026
@6ba3i 6ba3i added the ci Continue Integration label Apr 2, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.52%. Comparing base (dd52913) to head (132404f).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13900   +/-   ##
=======================================
  Coverage   96.52%   96.52%           
=======================================
  Files          10       10           
  Lines         690      690           
  Branches      108      108           
=======================================
  Hits          666      666           
  Misses          8        8           
  Partials       16       16           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@asiroliu asiroliu merged commit ee1bb8a into infiniflow:main Apr 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐖api The modified files are located under directory 'api/apps/sdk' 🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

2 participants