Feat/meta/sn#3991
Conversation
d26ab18 to
f9b5259
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3991 +/- ##
==========================================
- Coverage 27.70% 26.97% -0.73%
==========================================
Files 682 684 +2
Lines 47029 46513 -516
==========================================
- Hits 13029 12547 -482
- Misses 32756 32780 +24
+ Partials 1244 1186 -58 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
cthulhu-rider
left a comment
There was a problem hiding this comment.
finished. Lets fix everything and merge
@AnnaShaleva may u pls check chain configuration?
| // notification work; it is required to always read notifications without | ||
| // any blocking or making additional RPC. | ||
| notificationBuffSize = 100 | ||
| notificationBuffSize = 10000 |
There was a problem hiding this comment.
this is an address + pointer buff channel, what cons may we have? ~703KB of memory
There was a problem hiding this comment.
i can change it to any value. do you have a suggestion? i just had an experience with deadlock with neo-go subscription, so this is why this big value was chosen
There was a problem hiding this comment.
That's why I'm asking. Increasing buffer size is not a solution to the deadlock problem. It will make the problem more hidden, that's it.
If there's a deadlock, it should be fixed in some other (explicit) way.
There was a problem hiding this comment.
Increasing buffer size is not a solution to the deadlock problem
we are balancing b/w notification handling speed and storage speed. i guess it is another thing for exploring in load testing (yet not answered)
AnnaShaleva
left a comment
There was a problem hiding this comment.
Tests are failing. Other than that looks legit as a prototype.
They should be adopted, yes. And there are other problems. Config check and changelog are not accepted to the experimental things. |
cthulhu-rider
left a comment
There was a problem hiding this comment.
seems good to me overall
|
|
||
| func (m *Meta) notificationHandler(ctx context.Context, buff <-chan *state.ContainedNotificationEvent) { | ||
| for { | ||
| if len(buff) >= notificationBuffSize-1 { |
| on.m.Unlock() | ||
|
|
||
| if ok { | ||
| on.metaSvc.taskQueue <- storageTask{addr: addr, o: &sub.objHeader} |
There was a problem hiding this comment.
Does it make any difference? Local HEAD should be pretty fast.
There was a problem hiding this comment.
why HEAD smth, when a node already has header in memory?
There was a problem hiding this comment.
it also may be non-local, why not?
There was a problem hiding this comment.
Code is more complicated for sure. Whether it's worth this complication or not is an open question.
There was a problem hiding this comment.
8 nodes, REP 3: we read (block writing at the same time) our own metabase, OR in 62% go to a different node for a header we had in memory just about ~25ms ago. why?
There was a problem hiding this comment.
I don't see any difference in chances, in 3 out of 8 cases it's local, in 5 out of 8 it's networked. Irrespective of this structure. Let's keep it as is for now, this can be checked in future as well.
There was a problem hiding this comment.
5 out of 8 it's networked
and it means this node collected header, has it already locally in memory, collected every signature, sent tx to the chain, expects the results in ~25ms, and... decided to drop this header to request it soon again from another node. to me, this is "read header from network" vs "read header from memory". i think i do not understand smth
There was a problem hiding this comment.
Are you talking about forwarding in-container node? That'd be 1 out of 5 not storing the object.
| wg.Go(func() { m.storager(ctx, m.taskQueue) }) | ||
|
|
||
| m.chain.SubscribeForBlocks(m.bCh) | ||
| m.chain.SubscribeForNotifications(m.evsCh) |
There was a problem hiding this comment.
Seems like this can be done via JSON-RPC as well. Can we have this mode (non-local chain) for nodes with IR nearby?
There was a problem hiding this comment.
Seems like this can be done via JSON-RPC as well
why is it better in any way?
Can we have this mode (non-local chain) for nodes with IR nearby?
what mode would it be? SN that does not have a local chain? what chain does it put it in then?
this is an interface, so not problem to have any chain source there, but i do not fully inderstand your intention
There was a problem hiding this comment.
Pretty easy and already discussed a number of times, IR+SN combo has two chains onboard while it could only have one. We can also experiment with non-local chains, but let's move this to another issue, #4022
7618a13 to
e21f8b1
Compare
10_000_000 meant nothing, GAS factor is 1_0000_0000. Also, new value means something at least. Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
It is available starting from v0.119.0. This should speed broadcast up, which is critical for metadata chain. Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
Just drop the old one, use new instead, no functional changed in the new one. Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
No description provided.