-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sync
-
?
-
6957
-
Not Needed
If a sync process crashes or is otherwise terminated, the SharedInfo stored in the lockfile will keep the sync_agent_present flag raised, meaning other processes won't be able to open the Realm file until the lockfile is deleted. Instead, we should devise a mechanism that ensures that when a process is terminated, there are no leftover flags and new processes can start using the file again.
@fealebenpae suggested storing an empty file in the management directory which is owned by the sync agent process and is released when the process is terminated, allowing for other processes to take over ownership, but other approaches are similarly valid.
This would solve the underlying issue causing the crashes reported in this ticket: https://github.com/realm/realm-dotnet/issues/3437.