sillsdev / sillsdev/TheCombine
Merge Duplicates spins forever when the duplicate search crashes
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 22
- Forks
- 10
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 9
Description
Describe the bug
FindPotentialDuplicates returns Ok() and does the work on a discarded task.
GetDuplicatesThenSignal sends CombineHub.MethodSuccess on success and nothing on
failure, so a crashed search leaves the user on a spinner forever — MergeHub waits on
that signal and SignalRHub has no timeout. #4366 logs the crash; it does not end the wait.
https://github.com/sillsdev/TheCombine/blob/master/Backend/Controllers/MergeController.cs#L178-L189
LiftController sends CombineHub.MethodFailure from its equivalent catch and SignalRHub
already handles it, but two things stop this being a one-liner:
-
MergeHub'sfailureActionis onlysetDataLoadStatus(Failure), which leaves
IdenticalDuplicatesDialogclaiming duplicates were found, Cancel hidden, over a
GoalStatus.Loadingspinner. It needs the alert androuter.navigate(Path.Goals)that
the request-failure path already does:
https://github.com/sillsdev/TheCombine/blob/master/src/goals/Redux/GoalActions.ts#L186-L190 -
MethodFailurecarries only a user id andGetAndStorePotentialDuplicatesreturns a bare
bool, so a request that throws after a newer one started would end the newer one's wait.
The counter that knows is private toMergeService:
https://github.com/sillsdev/TheCombine/blob/master/Backend/Services/MergeService.cs#L411-L424
To Reproduce
Make MergeService.GetPotentialDuplicates throw, then work through every
identical-vernacular set in Merge Duplicates. The "searching for similar duplicates" dialog
never changes.
Expected behavior
The user is told the search failed and returned to Goals, as a failed findSimilarDuplicates
request already does. A superseded request stays silent.
Environment:
- Backend, any deployment; not browser-specific.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with MergeController.cs lines 178-189 and MergeService.cs lines 411-424 to trace duplicate-search failures and request supersession. Then follow MergeHub's failureAction and the request-failure path in src/goals/Redux/GoalActions.ts lines 186-190. Done means failed searches alert the user and return to Goals, while superseded requests do not end a newer wait.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, typescript
- Domain
- backend, frontend, full-stack
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100