-
Notifications
You must be signed in to change notification settings - Fork 107
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
redis driver for blob cache information and metadb #2865
Conversation
this is awesome work. thank you. i wish i could finish this but company needs put me elsewhere. will be super excited to use this feature when it is ready. I wanted to note a few things, since i see some notes in your PR.
|
@andaaron thx for taking this up |
With regards to this specific point, we have a misunderstanding. The role of the cache driver is to store information on what blob was deduped and and where are the duplicates. The role of metadb is to store information taken from manifests, as well as other metadata about manifests, repos, and users. We wouldn't be using it to store and serve the actual image blobs, that is a separate storage implementation, where we support local folders and S3. |
2651e26
to
b82e496
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2865 +/- ##
==========================================
- Coverage 91.58% 91.03% -0.55%
==========================================
Files 171 174 +3
Lines 30488 32636 +2148
==========================================
+ Hits 27921 29710 +1789
- Misses 1931 2213 +282
- Partials 636 713 +77 ☔ View full report in Codecov by Sentry. |
4f0eb30
to
68f3926
Compare
eca3bdd
to
c5f0d20
Compare
Need to pass logger into redis client, else it uses default, which do not obey log config.
|
Ah, we'll see what we can do about that. |
Looked at the code they have for logging and here's some notes:
Implementation would be similar to:
I really don't like globals, but I don't see an alternative. Probably better, if it works:
Still uses a global. |
Can you try with my latest commit and see if the result is better? |
@andaaron no more messages on stderr:
zot.log:
|
Currently, we have dynamoDB as the remote shared cache but ideal only for the cloud use case. For on-prem use case, add support for redis. Signed-off-by: Ramkumar Chinchani <[email protected]>
Signed-off-by: Petu Eusebiu <[email protected]>
Signed-off-by: Alexei Dodon <[email protected]>
Signed-off-by: Andrei Aaron <[email protected]>
- add missing method GetAllBlobs - add redis cache tests, with and without mocking Signed-off-by: Andrei Aaron <[email protected]>
Signed-off-by: Andrei Aaron <[email protected]>
…s DB Signed-off-by: Andrei Aaron <[email protected]>
Signed-off-by: Andrei Aaron <[email protected]>
…ethod meta.Crate() Signed-off-by: Andrei Aaron <[email protected]>
Signed-off-by: Andrei Aaron <[email protected]>
Signed-off-by: Andrei Aaron <[email protected]>
Signed-off-by: Andrei Aaron <[email protected]>
…r pkg/api/config/redis Signed-off-by: Andrei Aaron <[email protected]>
Signed-off-by: Andrei Aaron <[email protected]>
Signed-off-by: Andrei Aaron <[email protected]>
Signed-off-by: Andrei Aaron <[email protected]>
Signed-off-by: Andrei Aaron <[email protected]>
@vooon, thank you for taking the time to test this change. It is now merged into main branch. |
Rebased #2412 and continued work on missing method implementation for cache driver, and implemented MetaDB methods.
Still need to:
run lintermake sure all existing tests passcache drivermetadbparsing different redis client configuration optionsaccount for separate redis configuration for different substoresneed to check what support they offer in this library for concurrent goroutineseven if they have support for concurrent goroutines in the library we need a solution to work with multiple zot instances using the same database instance- using https://github.com/go-redsync/redsyncBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.