-
Notifications
You must be signed in to change notification settings - Fork 38
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
node/objects: Distribute objects in container via replication protocol #2802
Conversation
cthulhu-rider
commented
Apr 5, 2024
- based on and blocked by engine: Support writing already encoded objects #2801 (first 2 commits)
9cc9710
to
7c7c108
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2802 +/- ##
==========================================
+ Coverage 23.61% 23.64% +0.02%
==========================================
Files 770 772 +2
Lines 44527 44651 +124
==========================================
+ Hits 10514 10556 +42
- Misses 33163 33241 +78
- Partials 850 854 +4 ☔ View full report in Codecov by Sentry. |
bc05110
to
97e6ffd
Compare
post-0.41.0 |
97e6ffd
to
041b24b
Compare
|
||
// SendReplicationRequestToNode connects to described node and sends prepared | ||
// replication request message to it. | ||
func (x *transport) SendReplicationRequestToNode(ctx context.Context, req []byte, node coreclient.NodeInfo) error { |
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.
shouldn't binary object be here as arg while request collection is placed inside this func?
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.
nope for the sake of performance: node sends same object to several nodes
041b24b
to
af2a759
Compare
Method can be used to send raw requests. Nothing prevents the implementation to be done. Signed-off-by: Leonard Lyubich <[email protected]>
Previously, storage nodes always sent "ready" objects after client data slicing via NeoFS API `ObjectService.Put` RPC. Recently, NeoFS protocol was extended with `ObjectService.Replicate` RPC allowing to replicate object from one container node to another. New RPC is more efficient, and now used by Policer+Replicator tandem to replicate objects on shortage. Actually, when `ObjectService.Put` server makes initial object save, it does completely the same. In total, when `Put` server represents storage node from the container, it can use `Replicate` RPC for better performance. An additional advantage is the one-time encoding of the protocol message, which is reused for sending to different nodes. This reduces the memory cost of processing each data stream. Refs #2316. Signed-off-by: Leonard Lyubich <[email protected]>
Signed-off-by: Leonard Lyubich <[email protected]>
af2a759
to
92a01fe
Compare
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.
I think, we need a deep refactor in the distribution code, it went through a lot of changes. We have many "dynamic" code (where []byte
may mean different things, obj
and encodedObject
are neighbors fields, etc), traverser is not the only one who knows about object placement, some TODOs and proto code are also here but we need to go further.