Skip to content
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

Implement request merging #10

Open
zimbatm opened this issue Aug 17, 2020 · 1 comment
Open

Implement request merging #10

zimbatm opened this issue Aug 17, 2020 · 1 comment
Assignees

Comments

@zimbatm
Copy link
Member

zimbatm commented Aug 17, 2020

When multiple clients access the same NAR file at the same time, we could download the file from the S3 bucket only once.

  1. Add a concurrent lock on a per-derivation hash basis.
  2. Associate the NAR stream to the lock.
type CachedBinaryCacheReader struct {
  Reader BinaryCacheReader
  Lock map[string]io.ReaderCloser
  Mutex sync.Mutex
}

func (r CachedBinaryCacheReader) GetFile(ctx context.Context, path string) (io.ReadCloser, error) {

}
@stv0g
Copy link
Contributor

stv0g commented Mar 1, 2024

Duplicate of #4?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants