Stop randomize_child_id when handoff #226
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
resolves #207
Debug
Following the instruction from #207, I noticed that new processes are keep added to the
DeltaCrdt.read(Conv.ConversationSupervisor.Crdt)
. Whenever a new process is handed off to another node, a duplicate record is created, with a new child.idChange
By removing the
randomize_child_id
during the handoff process, I was able to fix this issue.Question
I try to understand why we needed to add
randomize_child_id
and found this PR. #196This PR says, "Deduplication will be the sole responsibility of Horde.Registry", but I was not able to find the logic from the
Horde.Registry
fixing the duplicated processes.I think PR #196 was meant to remove
Horde.ProcessesSupervisor.terminate_child_by_id
. https://github.com/derekkraan/horde/pull/196/files#diff-36c0ba7f42365d4eeaa857f4b899986cb28d29ff94de730fd8c1934c872a0389L476because this change stoped terminating the old process, we need a consistent id for
Horde.Registry
to prevent creating a duplicated process.