Skip to content

Commit be9c083

Browse files
[CAS] Add OnDiskGraphDB and OnDiskKeyValueDB (#114102)
Add OnDiskGraphDB and OnDiskKeyValueDB that can be used to implement ObjectStore and ActionCache respectively. Those are on-disk persistent storage that build upon OnDiskTrieHashMap and implements key functions that are required by LLVMCAS interfaces. This abstraction layer defines how the objects are hashed and stored on disk. OnDiskKeyValueDB is a basic OnDiskTrieHashMap while OnDiskGraphDB also defines: * How objects of various size are store on disk and are referenced by the trie nodes. * How to store the references from one stored object to another object that is referenced. In addition to basic APIs for ObjectStore and ActionCache, other advances database configuration features can be implemented in this layer without exposing to the users of the LLVMCAS interface. For example, OnDiskGraphDB has a faulty in function to fetch data from an upstream OnDiskGraphDB if the data is missing.
1 parent 13498bc commit be9c083

15 files changed

+3009
-7
lines changed

llvm/include/llvm/CAS/OnDiskDataAllocator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class OnDiskDataAllocator {
6464

6565
/// \returns the buffer that was allocated at \p create time, with size
6666
/// \p UserHeaderSize.
67-
MutableArrayRef<uint8_t> getUserHeader();
67+
MutableArrayRef<uint8_t> getUserHeader() const;
6868

6969
size_t size() const;
7070
size_t capacity() const;

0 commit comments

Comments
 (0)