Repository navigation
Batch large document metadata chunk sync - #1645
Merged
Paul Lizer (paullizer) merged 1 commit intoOct 6, 2026
Merged
Paul Lizer (paullizer) merged 1 commit into
Paul Lizer (paullizer) merged 1 commit into
Conversation
…metadata tag updates timed out.
Contributor
Author
|
Paul Lizer (@paullizer) Bionic711 This PR fixes an issue where a user adding a metadata tag to a large document causes a invalid json error due to an html error page being sent back that is caused by a long request timing out during the metadata update process. |
Paul Lizer (paullizer)
merged commit Oct 6, 2026
2ab4cf4
into
microsoft:Development
12 checks passed
Contributor
|
Great! Thanks for sharing, I didnt know this was a bug. I will investigate improving the underlying code to better support large files. |
This was referenced Oct 6, 2026
Chad Palmer (chadpalmer)
pushed a commit
to Xeelee33/simplechat
that referenced
this pull request
Oct 6, 2026
- Replace per-chunk AI Search GET + full re-upload with key-paged merge_documents batches that send only the changed fields, so embeddings never round-trip and Search/Cosmos calls drop ~500x. - Record a durable sync request with each metadata save; a leased background worker projects pending fields, retries with backoff, and a reconciler loop resumes failed or orphaned syncs. - Project shared_user_ids/shared_group_ids changes to chunks before saving them (fail closed), fixing group sharing changes that never reached Search. - Save metadata PATCH fields in one update in all workspaces, drop the duplicate tag passes, and retire the microsoft#1645 browser continuation loop. Refs microsoft#1657 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
Saving tags or other metadata for large XML/large document uploads could time out while synchronizing every search chunk. The browser then tried to parse the timeout HTML response as JSON, surfacing an invalid JSON error even though the underlying issue was the long-running metadata update.
Changes
update_document()now supportschunk_sync_limit,chunk_sync_offset, andchunk_sync_fields, returning progress when search chunk metadata sync needs continuation.workspace-documents.jsnow retries/continues the metadata PATCH flow until chunk sync completes.v0.261.051.Validation
git diff --check upstream/Development...HEADpython -m py_compile application/single_app/config.py application/single_app/functions_documents.py application/single_app/route_backend_documents.py functional_tests/test_document_metadata_chunk_sync_batching.pypython functional_tests/test_document_metadata_chunk_sync_batching.pynode --check application/single_app/static/js/workspace/workspace-documents.jspython scripts/check_swagger_routes.py application/single_app/route_backend_documents.pypython functional_tests/route_tests/test_route_blueprint_policy_inventory.pypython functional_tests/route_tests/test_route_unauthenticated_policy_contract.pypython functional_tests/route_tests/test_route_policy_test_coverage.pypython scripts/check_xss_sinks.py --base-sha upstream/Development --head-sha HEAD application/single_app/functions_documents.py application/single_app/route_backend_documents.py application/single_app/static/js/workspace/workspace-documents.jspython scripts/check_broken_access_control.py --base-sha upstream/Development --head-sha HEAD application/single_app/functions_documents.py application/single_app/route_backend_documents.pypython functional_tests/test_docs_site_quality.pyNotes
bills, click Save Metadata, and confirm the dialog completes without an invalid JSON error.