-
Notifications
You must be signed in to change notification settings - Fork 134
Cache from s3 instead of fuse #1138
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
base: main
Are you sure you want to change the base?
Conversation
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.
mrge found 7 issues across 7 files. View them in mrge.io
| ForcePathStyle: c.config.ImageService.Registries.S3.Primary.ForcePathStyle, | ||
| }, blobcache.StoreContentOptions{ | ||
| CreateCacheFSEntry: true, | ||
| RoutingKey: sourcePath, |
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.
The sourcePath construction is changed but still used as the routing key, which might cause inconsistency with previously cached items
| nodeFilters: | ||
| - server:0 | ||
| - volume: $PWD/.k3d/storage:k3s-storage | ||
| - volume: $HOME/.beta9-k3d/storage:k3s-storage |
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.
Should probably merge main into this branch. I think you already merged this change in right?
| client := c.fileCacheManager.GetClient() | ||
|
|
||
| // Remove the leading "/" from the checkpoint path | ||
| sourcePath := checkpointPath[1:] |
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 actually don't think this // Remove the leading "/" from the checkpoint path is necessary anymore. But maybe leave it for now.
pkg/worker/image.go
Outdated
| operation := func() error { | ||
| baseBlobFsContentPath := fmt.Sprintf("%s/%s", baseFileCachePath, sourcePath) | ||
| if _, err := os.Stat(baseBlobFsContentPath); err == nil && c.cacheClient.IsPathCachedNearby(ctx, "/"+sourcePath) { | ||
| if _, err := os.Stat(baseBlobFsContentPath); err == nil && c.cacheClient.IsPathCachedNearby(ctx, "/"+imageKey) { |
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 would triple check that the routing key and the image key are exactly the same. This caused an issue in prod last night because the routing key and path passed here were different. I think below you're using the sourcePath (the full s3 qualifier), and up here in the filesystem you're using the image key.
Resolve BE-2569
Summary by mrge
Switched file caching to use S3 as the source instead of FUSE, improving reliability and simplifying the caching process.
Requires beam-cloud/blobcache-v2#49
beam-cloud/geesefs#5