fix(store): Prevent out-of-order server responses to mess up the folder listing#62032
Open
DerDreschner wants to merge 2 commits into
Open
fix(store): Prevent out-of-order server responses to mess up the folder listing#62032DerDreschner wants to merge 2 commits into
DerDreschner wants to merge 2 commits into
Conversation
… state Assisted-by: ClaudeCode:claude-fable-5 Signed-off-by: David Dreschner <david.dreschner@nextcloud.com>
Contributor
Author
|
/backport to stable34 |
Contributor
Author
|
/backport to stable33 |
Contributor
Author
|
/backport to stable32 |
Contributor
Author
|
/compile |
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
susnux
reviewed
Jul 13, 2026
Comment on lines
+52
to
+58
| // Update the local store synchronously first, in call order, so the UI | ||
| // reflects the change immediately. Emitting only after the awaited server | ||
| // round-trip means rapid updates (e.g. flipping the sort direction several | ||
| // times in a row) issue concurrent PUTs that may resolve out of order, | ||
| // leaving the local state on whichever request finished last rather than | ||
| // the user's most recent action. | ||
| emit('files:view-config:updated', { view, key, value }) |
Contributor
There was a problem hiding this comment.
This causes invalid state if the PUT fails, that why it is emitted after the PUT.
susnux
requested changes
Jul 13, 2026
susnux
left a comment
Contributor
There was a problem hiding this comment.
If you pre-emit the event before the actual update you must handle the error case where the update failed and revert the config update.
Contributor
If its only about the tests then make them wait for the PUT before continue. Should be an easy wait for response call. |
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
This PR fixes a race condition that affects the playwright tests under high load on the CI runners. In case the race condition occurs, the tests fail with the following message:
Checklist
3. to review, feature component)stable32)AI (if applicable)