Repository navigation
feat(heartbeat): add the HeartbeatStateMachine - #174
Merged
Merged
Conversation
nickkkccc
force-pushed
the
add-heartbeat-state-machine
branch
from
November 17, 2026 12:44
aa67de1 to
5291e46
Compare
This was referenced Nov 17, 2026
bitgorbovsky
requested changes
Nov 18, 2026
nickkkccc
force-pushed
the
add-heartbeat-state-machine
branch
from
November 18, 2026 16:54
5291e46 to
ae10944
Compare
bitgorbovsky
requested changes
Nov 18, 2026
nickkkccc
force-pushed
the
add-heartbeat-state-machine
branch
from
November 19, 2026 09:49
ae10944 to
ed92783
Compare
bitgorbovsky
requested changes
Nov 19, 2026
| } | ||
| } | ||
|
|
||
| private void sendIfNotLast(HeartbeatEvent expectedLast, PolicyEvent eventToSend) { |
Contributor
There was a problem hiding this comment.
Думаю, что compareWithLastAndSend будет понятнее. Потому что если перевести название метода, будет "отправить, если не последнее" - не очень понятно.
А вот compareWithLastAndSend - понятнее - "сравнить с последним, и отправить, если не равно". Подобно compareAndSet у атомарных переменных.
Или что-то вроде sendIfNotComparedWithLast. В общем, можно подумать над другими вариантами
| } | ||
| } | ||
|
|
||
| private static Throwable unwrap(Throwable ex) { |
Contributor
There was a problem hiding this comment.
Забыл убрать? Почти точная копия есть теперь в CFUtils
nickkkccc
force-pushed
the
add-heartbeat-state-machine
branch
from
November 19, 2026 13:42
ed92783 to
9d2a188
Compare
An implementation of the `HeartbeatMachine` has been added; it serves as a redesigned version of the heartbeat mechanism used in `PoolEntry`. This implementation utilizes an event-driven state machine based on: - `io.tarantool.core.state.AbstractDrainLoopMachine.java` - `io.tarantool.core.state.Event` - `io.tarantool.core.state.State`
- Tests have been added to verify the functionality of the HeartbeatStateMachine state machine.
- Added a test class to verify heartbeat window evaluation logic and connection state transitions.
nickkkccc
force-pushed
the
add-heartbeat-state-machine
branch
from
November 19, 2026 13:46
9d2a188 to
6a4bea3
Compare
bitgorbovsky
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I haven't forgotten about:
Related issues: