supervisor: fix large opaque data handle#613
Merged
changweige merged 1 commit intocontainerd:mainfrom Sep 2, 2024
Merged
Conversation
Collaborator
imeoer
commented
Aug 16, 2024
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #613 +/- ##
==========================================
+ Coverage 21.82% 22.07% +0.24%
==========================================
Files 122 122
Lines 10730 10746 +16
==========================================
+ Hits 2342 2372 +30
+ Misses 8070 8054 -16
- Partials 318 320 +2
|
changweige
reviewed
Aug 16, 2024
|
|
||
| func (mss *MemStatesStorage) Write(data []byte) { | ||
| l := copy(mss.data[mss.head:], data) | ||
| mss.head += l |
Member
There was a problem hiding this comment.
Without head, States storage can't support append-write
Collaborator
Author
There was a problem hiding this comment.
Thanks, we haven't needed append yet. :)
306cf98 to
2101000
Compare
When the supervisor needs to process a large amount of opaque data (for example, a nydusd instance has a large number of sub mounts, and the opaque is usually larger than 32kb), a recvmsg / sendmsg system call cannot process all data. The commit fixes the problem with multiple recvmsg/sendmsg calls and updates the test cases. Signed-off-by: Yan Song <[email protected]>
changweige
reviewed
Sep 2, 2024
| return nil, 0, err | ||
| } | ||
|
|
||
| return data, su.fd, nil |
Member
There was a problem hiding this comment.
Should we check if fd is positive?
Collaborator
Author
There was a problem hiding this comment.
Should be ok, but maybe we don't have to limit it.
changweige
reviewed
Sep 2, 2024
| }) | ||
|
|
||
| eg.Go(func() error { | ||
| err := receiver() |
Member
There was a problem hiding this comment.
Why trigger and receiver have to run in parallel in separted goroutines?
changweige
approved these changes
Sep 2, 2024
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.