feat(backend): replace maps with gokv.Store abstraction#671
Draft
glimchb wants to merge 4 commits intoopiproject:mainfrom
Draft
feat(backend): replace maps with gokv.Store abstraction#671glimchb wants to merge 4 commits intoopiproject:mainfrom
glimchb wants to merge 4 commits intoopiproject:mainfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## main #671 +/- ##
==========================================
- Coverage 76.53% 74.26% -2.28%
==========================================
Files 35 34 -1
Lines 3533 4010 +477
==========================================
+ Hits 2704 2978 +274
- Misses 752 921 +169
- Partials 77 111 +34
|
80f0683 to
7c305ee
Compare
d2ba72a to
4ba64c7
Compare
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Contributor
artek-koltun
left a comment
There was a problem hiding this comment.
Looks good!
However, we need to try to implement keys collection and retrieval. Probably, by means of the idea we discussed last week. It will define if that storage library fits our needs
| volume := new(pb.AioVolume) | ||
| found, err := s.store.Get(in.AioVolume.Name, volume) | ||
| if err != nil { | ||
| return nil, err |
Contributor
There was a problem hiding this comment.
I'd explicitly set gRPC error code as Internal in all storage related operations by means of status.Errof(codes.Internal,...)
| // idempotent API when called with same key, should return same object | ||
| volume, ok := s.Volumes.NvmeControllers[in.NvmeRemoteController.Name] | ||
| if ok { | ||
| volume := new(pb.NvmeRemoteController) |
| // fetch object from the database | ||
| volume, ok := s.Volumes.NvmePaths[in.NvmePath.Name] | ||
| if !ok { | ||
| volume := new(pb.NvmePath) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Boris Glimcher Boris.Glimcher@emc.com