mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
3ee98c82e2
Summary: This updates microwave to also support changesets, in addition to filenodes. Those create a non-trivial amount of SQL load when we warm up the cache (due to sequential reads), which we can eliminate by loading them through microwave. They're also a bottleneck when manifests are loaded already. Note: as part of this, I've updated the Microwave wrapper methods to panic if we try to access a method that isn't instrumented. Since we'd be running the Microwave builder in the background, this feels OK (because then we'd find out if we call them during cache warmup unexpectedly). Reviewed By: farnz Differential Revision: D20221463 fbshipit-source-id: 317023677af4180007001fcaccc203681b7c95b7
40 lines
1.3 KiB
Thrift
40 lines
1.3 KiB
Thrift
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This software may be used and distributed according to the terms of the
|
|
* GNU General Public License version 2.
|
|
*/
|
|
|
|
include "eden/mononoke/mononoke_types/if/mononoke_types_thrift.thrift"
|
|
include "eden/mononoke/mercurial/types/if/mercurial_thrift.thrift"
|
|
|
|
// Code version constant -- update to invalidate saved state.
|
|
const i32 CODEVER = 1
|
|
|
|
struct FilenodeSnapshot {
|
|
// Note: required fields are enforced at runtime here (to prevent Thift from
|
|
// giving us garbage values and calling those acceptable).
|
|
1: optional mononoke_types_thrift.RepoPath path,
|
|
2: optional mercurial_thrift.HgNodeHash filenode,
|
|
3: optional mercurial_thrift.HgNodeHash p1,
|
|
4: optional mercurial_thrift.HgNodeHash p2,
|
|
5: optional CopyInfoSnapshot copyfrom,
|
|
6: optional mercurial_thrift.HgNodeHash linknode,
|
|
}
|
|
|
|
struct CopyInfoSnapshot {
|
|
1: optional mononoke_types_thrift.RepoPath path,
|
|
2: optional mercurial_thrift.HgNodeHash filenode,
|
|
}
|
|
|
|
struct ChangesetSnapshot {
|
|
1: optional mononoke_types_thrift.ChangesetId cs_id,
|
|
2: optional list<mononoke_types_thrift.ChangesetId> parents,
|
|
3: optional i64 gen,
|
|
}
|
|
|
|
struct RepoSnapshot {
|
|
1: optional list<FilenodeSnapshot> filenodes,
|
|
2: optional list<ChangesetSnapshot> changesets,
|
|
}
|