hiero-ledger / hiero-ledger/hiero-consensus-node

Open discussion: Teacher starts a new reconnect without canceling the current one

Open
#18,546 5 comments 0 reactions 1 assignee Assigned to @Jeffrey-morgan34 View on GitHub
Platform Platform Reconnect
Dominant language
Java
Stars
406
Forks
226
Avg merge
3d 4h
Merged PRs (30d)
210

Description

When teaching takes too long, it is not obvious what to do:
- the teacher can possibly kill learner connection (as suggested below), but this leaves two behind the scenes nodes and waste all time spent in teaching so far
- the teacher can finish teaching and then both nodes can do another reconnect (but this is not proof against super long reconnects)
- the teacher can try to finish the teaching, but have some kind of timer to still kill super-slow learners

While it is a problem on perf network, we are not really facing it in production. Possibly, it would be better to spend time investigating why nodes are suddenly taking days instead of minutes to complete learning and then implement more aggresive teacher heuristics for well behaved nodes.

---- ORIGINAL BUG BELOW -----

A reconnect session gets stuck for whatever reason. The teacher gets behind due to memory pressure (see #11086) and initiates its own reconnect. The old session is not canceled, however, and the connection is kept alive. If the learner from the old session is killed, the connection gets broken, the teacher abandons the session and regains memory allowing it to recover and finish its own reconnect.

When the teacher gets behind and decides to initiate a new reconnect session as a learner it should cancel the current reconnect.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.