Skip to content

Serialize concurrent first VSP compilation - #1466

Open
danielhmills wants to merge 1 commit into
openlink:develop/7from
danielhmills:fix/vsp-compile-mutex
Open

Serialize concurrent first VSP compilation#1466
danielhmills wants to merge 1 commit into
openlink:develop/7from
danielhmills:fix/vsp-compile-mutex

Conversation

@danielhmills

Copy link
Copy Markdown
Contributor

Summary

  • Adds a mutex to serialize the first compilation of a VSP page when multiple HTTP workers reach the compile path concurrently.
  • Prevents race conditions where several workers try to create the same generated procedure before the registry and procedure catalog entries are visible to each other.
  • A proxy request that re-enters ws_request is excluded from the mutex to avoid deadlock between the proxy worker and the target worker.

Note

As imitko noted on PR #1465, the VSP is a stored procedure and the compile/re-compile critical sections should ideally handle this concurrency. This HTTP-layer mutex is a stopgap. Guidance is welcome on whether the fix belongs in the procedure compile/re-compile critical sections instead.

Test plan

  • VSP pages compile and serve correctly under concurrent first-access
  • Proxy requests do not deadlock

Generated with Devin

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