-
Notifications
You must be signed in to change notification settings - Fork 13
Crash server - Blacklist item during sync restart #1193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Crash server - Blacklist item during sync restart #1193
Conversation
…hub.com:Infomaniak/desktop-kDrive into Crash-server-blacklist-item-during-sync-restart
|
|
||
| class SYNCENGINE_EXPORT SyncPal : public std::enable_shared_from_this<SyncPal> { | ||
| public: | ||
| static std::recursive_mutex updateTreesMutex; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not comfortable with the idea of a mutex being accessible anywhere in the code. This seems to have high risk of deadlock and/or impacting performance.
Moreover, it seems to me that only the running module should be accessing and modifying the update trees. Therefor, no concurrent access should occur. Maybe the algorithm is to be refactored somewhere instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The LocalFileSystemObserverWorker updates the update trees and runs in parallel with the other modules:
LocalFileSystemObserverWorker::sendAccessDeniedError => SyncPal::handleAccessDeniedItem => UpdateTree::deleteNode
|



During a sync restart after a DataError, the localFileSystemObserverWorker continues to run and in case of AccessDenied, the handleAccessDeniedItem method is called which accesses the updateTree while it is destroyed/recreated by the sync restart.