IGNITE-18456 Explain treading model in corresponding README.md file f…#1493
Conversation
09c8d1c to
48c1ea3
Compare
|
|
||
| The module for store and access to metadata. | ||
|
|
||
| The storage is distributed to prevent losing data and based of RAFT. In typical case, the group consists of only several nodes of the |
There was a problem hiding this comment.
Well, that's not only to prevent data loss but also for fault tolerance, etc.
There was a problem hiding this comment.
Failure tolerance has the same stance in case of one node leaves the cluster and data should be still available. In my mind, the prevention of losing data is a general characteristic for all requirements that an any distributed system has.
|
|
||
| The module for store and access to metadata. | ||
|
|
||
| The storage is distributed to prevent losing data and based of RAFT. In typical case, the group consists of only several nodes of the |
There was a problem hiding this comment.
In typical case, the group consists of only several nodes of the...
Could you please rephrase it? Currently it seems to be a little bit ambiguous. Let's say that meta storage group has it's nodes on top of every cluster node, however most of such participants are learners (here we should explain what raft learner is) and only few (3, 5) of them are voting ones. Basically it's what you've already told above but with greater details.
There was a problem hiding this comment.
I reformulated this part.
|
|
||
| ### Interface methods | ||
|
|
||
| Various operations (*get()*, *getAll()*, *invoke()*) in Metastorage manager return futures. Those futures are completed when the matched |
There was a problem hiding this comment.
As we've discussed let's add few more details here.
There was a problem hiding this comment.
Added link to raft module.
| this.metaStorageSvcFut = cmgMgr.metaStorageNodes() | ||
| // use default executor to avoid blocking CMG manager threads | ||
| .thenComposeAsync(metaStorageNodes -> { | ||
| .thenCompose(metaStorageNodes -> { |
There was a problem hiding this comment.
Is that about
The component is used common ForkJoinPool on start
?
There's a comment
// use default executor to avoid blocking CMG manager threads
So, do you really think that using thenCompose instead of thenComposeAsync won't block CMG manager threads?
There was a problem hiding this comment.
I am sure, because the code does not execute in CMG thread after all components began start in the common thread pool.
There was a problem hiding this comment.
The comment about CMG thread are removed from here.
| Both of the executors have no a node name in their names. The names are required to identify threads belonged to different Ignite nodes on | ||
| the shared java machine (TODO: IGNITE-18504 Add nodes name in prefix to Metastorage executors). | ||
|
|
||
| ### Interface methods |
There was a problem hiding this comment.
Initially, there were asyncs on cursors, we do expect this to be reworked with subscribers, correct? If true this subscribers will probably add some (one?) new threads. Could you please create a follow-up ticket in order to update ms thread-model after Alexander will finish his ms-cursors refactoring?
There was a problem hiding this comment.
We even have no an JIRA ticket to redesign cursor API to reactive model for Metastorage. But I notified @sashapolo about the modification can be required after the API will have changed.
9d37d36 to
76367f4
Compare
| threads, this result appears in the RAFT client executor with prefix <NODE_NAME>%Raft-Group-Client. See RAFT module for more information | ||
| about its threading model. | ||
|
|
||
| Although some methods return futures, they are often run synchronously. Futures are dependent on asynchronous Metastorage initialization, |
There was a problem hiding this comment.
shouldn'we specify these methods? "some methods" sounds too uncertain
There was a problem hiding this comment.
Honestly, I do not shut what exactly methods can appear in Metastorage manager, except method that are using to access data (but they are, for example, method of stopping watch). Rather, I mean this about all method that does not connected with data access, but return a future.
There was a problem hiding this comment.
I don't know exactly because this moment the Metastorae API is changing.
…or MetaStorageManager (apache#1493)
…or MetaStorageManager (apache#1493)
…or MetaStorageManager
https://issues.apache.org/jira/browse/IGNITE-18456