-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
solver: add sqlcachestorage as an alternative to the bolt db #5246
base: master
Are you sure you want to change the base?
Conversation
b36e3a2
to
5b13335
Compare
5b13335
to
a896ff2
Compare
I thought I'd experiment with this idea because I had noticed that the cachedb had a relational pattern. I haven't done any profiling with this, but I did note some things while working on this PR.
|
#BUILDKIT_DEBUG: 1 | ||
CGO_ENABLED: 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.
For CGO mode-free you can look at https://pkg.go.dev/modernc.org/sqlite
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 think we can consider this if we need a CGO free mode. At the current moment, we still have the bolt database and we can just easily say "this feature only exists with cgo". I took a look at that project and the C library seems to be faster in most places.
I updated the PR to include some better messages for when cgo is disabled and to also only enable it on linux and darwin which shouldn't even matter much because I don't think you can run buildkit on darwin or windows anyway.
a896ff2
to
7c59d6e
Compare
a49a037
to
052e1fb
Compare
This creates an sql cache storage that stores the cache key index in an sqlite3 database instead of in bolt. At the moment, this is just functional in the bare minimum as a way to test the feasibility of this method. There are ways to configure the sqlite database for more efficient transactions. This can be used as an alternative storage for bolt db and is potentially usable as a distributed cache key storage for another implementation in the future. Signed-off-by: Jonathan A. Sternberg <[email protected]>
052e1fb
to
1286ed3
Compare
This creates an sql cache storage that stores the cache key index in an sqlite3 database instead of in bolt. At the moment, this is just functional in the bare minimum as a way to test the feasibility of this method. There are ways to configure the sqlite database for more efficient transactions.
This can be used as an alternative storage for bolt db and is potentially usable as a distributed cache key storage for another implementation in the future.