-
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
Cache storage policy application results (Put
)
#2901
Conversation
Put
)
3e65761
to
00e3d64
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2901 +/- ##
==========================================
+ Coverage 23.51% 23.91% +0.40%
==========================================
Files 776 775 -1
Lines 45325 45648 +323
==========================================
+ Hits 10656 10917 +261
- Misses 33822 33874 +52
- Partials 847 857 +10 ☔ View full report in Codecov by Sentry. |
00e3d64
to
ec7d09e
Compare
@@ -256,14 +256,13 @@ func initObjectService(c *cfg) { | |||
searchsvcV2.WithKeyStorage(keyStorage), | |||
) | |||
|
|||
sPut := putsvc.NewService(&transport{clients: putConstructor}, | |||
sPut := putsvc.NewService(&transport{clients: putConstructor}, c, |
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.
btw, why not an option? looks strange when there are position args and options but both are required in fact
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.
to not forget to pass it. I agree that in the end this should be brought to a general form
// policy and returns sort interface. | ||
// | ||
// GetContainerNodes implements [putsvc.NeoFSNetwork]. | ||
func (c *cfg) GetContainerNodes(cnrID cid.ID) (putsvc.ContainerNodes, 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.
why isn't it a part of containerNodes
? our cfg
becomes too complex. this method only uses cfg
's c.cfgObject.containerNodes
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.
yeah this would be nice, but cfg
does not inherit containerNodes
and providing putsvc.NeoFSNetwork
from containerNodes
is not intended right now. I'll try to do smth about it
UPD: this would require either one more interface adapter or separate interface for key locality check (now it's a single NeoFSNetwork
). Current version with the least changes
9f1d7ef
to
3084ed5
Compare
Continues 2f29338 for `ObjectService`'s `Put` server handler. opens the stage for optimizations of storage policy imposition. Previously, node selection was hidden behind placement traverser interface. currently, processing a single request requires preselection of container nodes in unsorted form and, in general w/ slicing, several sorts to place the resulting objects. In the previous code structure, cache optimization would be less seamless. Also, this refactor reveals the entire placement logic by removing unnecessary abstraction. Implementation is pretty massive, so unit tests for various scenarios are added. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
3084ed5
to
cd8a33c
Compare
https://rest.fs.neo.org/HXSaMJXk2g8C14ht8HSi7BBaiYZ1HeWh2xnWPGQCg4H6/1842-1724261309/index.html Something is not good with this PR. |
cd8a33c
to
729927e
Compare
Except CHANGELOG needs to be updated. |
729927e
to
2bb75dd
Compare
Get
/Head
/GetRange
) #2896