fuse passthrough: fix oom when running huge images by wswsmao · Pull Request #1923 · containerd/stargz-snapshotter (original) (raw)

During the testing of passthrough with large images, we observed that the containerd-stargz-grpc process was terminated. The reason for this issue is that the content to be merged is currently stored in bufPool, which poses a risk of memory exhaustion.

This commit modifies the implementation to directly write the chunks obtained from prefetchEntireFile to disk, thereby mitigating the risk of running out of memory.