PoC: BUGFIX: Close base workspace during command simulation#5828
Draft
mhsdesign wants to merge 4 commits into
Draft
PoC: BUGFIX: Close base workspace during command simulation#5828mhsdesign wants to merge 4 commits into
mhsdesign wants to merge 4 commits into
Conversation
…WorkspaceRebaseFailed`
kitsunet
reviewed
May 30, 2026
| $baseWorkspaceContentStreamVersion | ||
| ); | ||
| $baseWorkspaceContentStreamVersion = $baseWorkspaceContentStreamVersion->next(); | ||
| } catch (ConcurrencyException $concurrencyException) { |
Member
There was a problem hiding this comment.
Shouldn't we retry in this situation?
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.
Fixes deadlocks as per - see test: #5513
Should (TM) also fix: #5713
This change is a safeguard to ensure simulation is only executed one at a time per base-workspace.
Leveraging content stream closing via the eventstore we prevent any writes or other publish/rebase operation on the base workspace.
This means that only one user at time can Discard individual or Rebase their own workspace. Publishing to one common base-workspace was always by concept restricted as only one changeset can come first (
ConcurrencyException: Expected version: 2625, actual version: 2626).Before multiple users could rebase / discard individual simultaneously and might just end up being outdated still. Those users will now face one of these exceptions:
As effect of closing and also reopening the base workspace we cannot calculate the workspace state anymore correctly and end up being more often outdated due to the two additional events on the base which where added after the fork.
Problem, we close and reopen now even more often ...
... closing and reopening the base workspace might turn out even more fatal as the operation is not atomic. A suddenly dead connection WILL corrupt the system and leave live closed until manually forced open - which leaves us to provide tooling. Content stream closing IS NOT a good idea and must be removed eventually. See #5827
TODO:
changesVersioncolumn - needs value / default value for existing projectschangesVersionmakes sense^^boolhasChangescolumn and replace withversion = changesVersionContentStreamIsClosedinstead of wrapping asWorkspaceRebaseFailedUpgrade instructions
Review instructions
Checklist
FEATURE|TASK|BUGFIX!!!and have upgrade-instructions