revisionstore: properly implement get_missing for remote stores

Summary:
Remotestores can implement get_missing properly by simply querying the
underlying store that they will be writing to. This may prevent double fetching
some blobs in `hg prefetch` that we already have.

Reviewed By: DurhamG

Differential Revision: D20662668

fbshipit-source-id: 22140b5b7200c687e0ec723dd8879dc8fbea6fb9
This commit is contained in:
Xavier Deguillard 2020-03-30 14:42:35 -07:00 committed by Facebook GitHub Bot
parent e1ccc29eec
commit e0cfd08e7f
3 changed files with 4 additions and 4 deletions

View File

@ -139,7 +139,7 @@ impl HgIdDataStore for EdenApiRemoteDataStore {
impl LocalStore for EdenApiRemoteDataStore {
fn get_missing(&self, keys: &[StoreKey]) -> Result<Vec<StoreKey>> {
Ok(keys.to_vec())
self.inner.store.get_missing(keys)
}
}

View File

@ -1053,7 +1053,7 @@ impl HgIdDataStore for LfsRemoteStore {
impl LocalStore for LfsRemoteStore {
fn get_missing(&self, keys: &[StoreKey]) -> Result<Vec<StoreKey>> {
Ok(keys.to_vec())
self.store.get_missing(keys)
}
}

View File

@ -133,7 +133,7 @@ impl HgIdDataStore for FakeRemoteDataStore {
impl LocalStore for FakeRemoteDataStore {
fn get_missing(&self, keys: &[StoreKey]) -> Result<Vec<StoreKey>> {
Ok(keys.to_vec())
self.store.get_missing(keys)
}
}
@ -168,7 +168,7 @@ impl HgIdHistoryStore for FakeRemoteHistoryStore {
impl LocalStore for FakeRemoteHistoryStore {
fn get_missing(&self, keys: &[StoreKey]) -> Result<Vec<StoreKey>> {
Ok(keys.to_vec())
self.store.get_missing(keys)
}
}