sillsdev / sillsdev/TheCombine

Merge Duplicates spins forever when the duplicate search crashes

Open
#4,369 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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:

  1. MergeHub's failureAction is only setDataLoadStatus(Failure), which leaves
    IdenticalDuplicatesDialog claiming duplicates were found, Cancel hidden, over a
    GoalStatus.Loading spinner. It needs the alert and router.navigate(Path.Goals) that
    the request-failure path already does:
    https://github.com/sillsdev/TheCombine/blob/master/src/goals/Redux/GoalActions.ts#L186-L190

  2. MethodFailure carries only a user id and GetAndStorePotentialDuplicates returns 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 to MergeService:
    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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.