Skip to content

Conversation

@cachemeifyoucan
Copy link
Collaborator

@cachemeifyoucan cachemeifyoucan commented Oct 29, 2024

Add a new abstraction layer UnifiedOnDiskCache that adds new functions
of disk space management and data validation that builds on top of
OnDiskGraphDB and OnDiskKeyValueDB.

Build upon UnifiedOnDiskCache, it is OnDiskCAS that implements
ObjectStore and ActionCache interface for LLVM tools to interact with
CAS storage.

Add OnDiskCAS abstraction, that implements ObjectStore and ActionCache
interface using OnDiskGraphDB and OnDiskKeyValueDB.

Reviewers: 

Pull Request: #114103
@cachemeifyoucan cachemeifyoucan changed the base branch from users/cachemeifyoucan/spr/main.cas-add-ondiskcas to main October 22, 2025 19:51
@cachemeifyoucan cachemeifyoucan force-pushed the users/cachemeifyoucan/spr/cas-add-ondiskcas branch from 94172a6 to 4b951ef Compare October 22, 2025 19:51
@cachemeifyoucan cachemeifyoucan changed the title [CAS] Add OnDiskCAS [CAS] Add UnifiedOnDiskCache and OnDiskCAS Oct 22, 2025
Created using spr 1.3.7
Created using spr 1.3.7
Error validate() const final;

private:
std::shared_ptr<ondisk::UnifiedOnDiskCache> UniDB;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm missing it, but why does this need to be a shared_ptr? I don't see obvious uses where we're really relying on the refcount here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just extending the lifetime of the wrapped UnifiedOnDiskCache to make sure it is not deleted when ActionCache is still in use.

Alternatively, we can leave this as a raw pointer and left the life-time management to user, but since this is not really a ref-count that is being updated often, this safe guard is pretty safe to keep.

Created using spr 1.3.7
Copy link
Collaborator

@adrian-prantl adrian-prantl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate how well-documented the interface is!

Created using spr 1.3.7
@cachemeifyoucan cachemeifyoucan merged commit 6747ea0 into main Nov 3, 2025
10 checks passed
@cachemeifyoucan cachemeifyoucan deleted the users/cachemeifyoucan/spr/cas-add-ondiskcas branch November 3, 2025 17:50
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

Successfully merging this pull request may close these issues.

5 participants