WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: eliminate concurrency bug in file deletion logic by removing side effects from parallel stream (#40744)
## Description
Refactored the `updateEntitiesInRepo` method to avoid mutating a
non-thread-safe `HashSet` (`filesInRepo`) inside a parallel stream. The
previous implementation added file paths to `filesInRepo` as a side
effect within a `.parallelStream()`, which could lead to race conditions
and data corruption. The new approach uses a pure mapping operation to
build the map and then derives the set of file paths, ensuring thread
safety and improving code clarity.
Fixes #`Issue Number`
_or_
Fixes `Issue URL`
> [!WARNING]
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._
## Automation
/ok-to-test tags="@tag.All"
### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results -->
> [!IMPORTANT]
> 🟣 🟣 🟣 Your tests are running.
> Tests running at:
<https://github.com/appsmithorg/appsmith/actions/runs/15209038828>
> Commit: 3e3b283
> Workflow: `PR Automation test suite`
> Tags: `@tag.All`
> Spec: ``
> <hr>Fri, 23 May 2025 11:19:05 UTC
<!-- end of auto-generated comment: Cypress test results -->
## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Bug Fixes**
- Improved error recovery when saving updates to the Git repository,
ensuring changes are still applied even if an error occurs during the
update process.
- **Refactor**
- Enhanced the process for detecting and handling updated or deleted
files in the Git repository, leading to more reliable synchronization
and cleaner repository state.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
0 commit comments