-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IGNITE-18554 Remove MetaStorage learners on topology events #1542
Conversation
b49e06b
to
604efd9
Compare
0b03ce9
to
fdbb0f1
Compare
...ionTest/java/org/apache/ignite/internal/metastorage/impl/ItMetaStorageMultipleNodesTest.java
Outdated
Show resolved
Hide resolved
...ionTest/java/org/apache/ignite/internal/metastorage/impl/ItMetaStorageMultipleNodesTest.java
Show resolved
Hide resolved
...ionTest/java/org/apache/ignite/internal/metastorage/impl/ItMetaStorageMultipleNodesTest.java
Show resolved
Hide resolved
...ain/java/org/apache/ignite/internal/metastorage/impl/MetaStorageRaftGroupEventsListener.java
Outdated
Show resolved
Hide resolved
...ain/java/org/apache/ignite/internal/metastorage/impl/MetaStorageRaftGroupEventsListener.java
Show resolved
Hide resolved
...ain/java/org/apache/ignite/internal/metastorage/impl/MetaStorageRaftGroupEventsListener.java
Outdated
Show resolved
Hide resolved
...ain/java/org/apache/ignite/internal/metastorage/impl/MetaStorageRaftGroupEventsListener.java
Outdated
Show resolved
Hide resolved
...ain/java/org/apache/ignite/internal/metastorage/impl/MetaStorageRaftGroupEventsListener.java
Outdated
Show resolved
Hide resolved
bfa674c
to
ffd9bbd
Compare
ffd9bbd
to
13d9a44
Compare
logicalTopologyService.addEventListener(new LogicalTopologyEventListener() { | ||
@Override | ||
public void onNodeValidated(ClusterNode validatedNode) { | ||
executeIfLeader((service, term) -> addLearner(service.raftGroupService(), validatedNode)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- We do call onNodeValidated, ..., onNodeLeft are called within raft thread, is that correct?
- If true
2.a You didn't introduce any synchronous long running logic, e.g. network communication as a reaction to such events, did you? serializationFuture?
2.b You didn't introduce any logic that may prevent CMG state-machine idempotentancy, did you? Meaning, that if we'll have an exception within onSmt on Node A and won't have such an exception on Node B, CMG listener won't be effected, is that true? - Who is responsible for exception handling for serializationFuture? E.g. logging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do call onNodeValidated, ..., onNodeLeft are called within raft thread, is that correct?
yes
You didn't introduce any synchronous long running logic, e.g. network communication as a reaction to such events, did you? serializationFuture?
How is it possible to introduce synchronous network calls in our code? All such stuff is done asynchronously. That's exactly why I need the serializationFuture
- to chain a bunch of asynchronous calls to preserve Raft linearization guarantees. But I never wait on on this future.
You didn't introduce any logic that may prevent CMG state-machine idempotentancy, did you? Meaning, that if we'll have an exception within onSmt on Node A and won't have such an exception on Node B, CMG listener won't be effected, is that true?
Since all operations are asynchronous, I expect all exception to simply fail on the related thread and be possibly logged somewhere.
Who is responsible for exception handling for serializationFuture? E.g. logging.
Logging is done inside the action that is passed to executeIfLeaderImpl
. For example, see the updateConfigUnderLock
method, it should do all the logging.
https://issues.apache.org/jira/browse/IGNITE-18554