Commit Graph

8 Commits

Author SHA1 Message Date
Andres Suarez
21c95391ca Apply clang-format update fixes
Reviewed By: igorsugak

Differential Revision: D25861960

fbshipit-source-id: e3c39c080429058a58cdc66d45350e5d1420f98c
2021-01-10 10:06:29 -08:00
Xavier Deguillard
34598d4337 remove dependency on glog
Summary:
The EdenFS codebase uses folly/logging/xlog to log, but we were still relying
on glog for the various CHECK macros. Since xlog also contains equivalent CHECK
macros, let's just rely on them instead.

This is mostly codemodded + arc lint + various fixes to get it compile.

Reviewed By: chadaustin

Differential Revision: D24871174

fbshipit-source-id: 4d2a691df235d6dbd0fbd8f7c19d5a956e86b31c
2020-11-10 16:31:15 -08:00
Katie Mancini
550400364d introduce tree metadata storage in local store
Summary:
This introduces a class to manipulate the metadata for all the entries in a
tree. This adds serialization and deserialization to this class so that it can
be written to the local store.

Why do we need this? We need some way to easily check when we have already
fetched metadata for a tree and do not need to refetch this from the server to
avoid expensive network requests. Later diffs add functionally to store the metadata
for tree entries in the local store under the tree hash using this class.

Reviewed By: chadaustin

Differential Revision: D21959015

fbshipit-source-id: 0c0e8750737f3076c1f9604d0319cab7f2658656
2020-07-10 16:03:32 -07:00
Katie Mancini
dc94bc8916 create scs proxy hash
Summary:
In following diffs we will use scs to prefetch meta-data for files, so that this data
will be available with out fetching the file content (which will improve build times
on eden).

SCS indexes trees by an scs specific hash (blake2 content hash) or by the commit
hash and path. Since this is different from the eden hashes and mercurial
hashes, we need another index to go between the current ids we have in eden
and identifiers for scs.

This introduces a proxy hash that serves as this conversion. Because we have
commit hashes around in eden right now, this is an easier route to indexing
into scs currently.

Reviewed By: chadaustin

Differential Revision: D21237648

fbshipit-source-id: 79115ac034a5f062ae879713cd2c1a17f348c725
2020-07-10 16:03:31 -07:00
Chad Austin
f35f921d5d allow garbage collection of cached tree objects again
Summary:
Now that loading too many blobs only GCs the blob cache, treat cached
trees as ephemeral again.

Reviewed By: simpkins

Differential Revision: D19358375

fbshipit-source-id: 191427f46276f0f5d024b5bc923a68f7a42044da
2020-01-23 17:33:43 -08:00
Chad Austin
f7491f7741 add independent cache size limits per object type
Summary:
Instead of clearing every single cached object when the total size
exceeds the ephemeral storage limit, keep a limit per object type and
only clear those that exceed their quota.

Reviewed By: simpkins

Differential Revision: D19358312

fbshipit-source-id: 6918d6f4cc2931aed79a9025d0e0f357ede515e0
2020-01-21 19:41:47 -08:00
Chad Austin
e5e9d8cf69 clear the deprecated blobsize keyspace at startup
Summary:
EdenFS no longer uses the blobsize keyspace. To avoid wasting space,
clear and campact it on startup, along with any keyspaces we
deprecated in the future.

Reviewed By: fanzeyi

Differential Revision: D19354881

fbshipit-source-id: 5285757a0e44ab1080c5f940283e06b17bec811d
2020-01-21 10:33:11 -08:00
Chad Austin
d23773e9b0 restructure KeySpace and move it into KeySpace.h
Summary: Simplify the definition and use of KeySpace and move it into its own header.

Reviewed By: simpkins

Differential Revision: D19353441

fbshipit-source-id: ef07677d927a48839b709711388abeb3c1ed9679
2020-01-21 10:33:10 -08:00