Skip to content

Commit bb3ef17

Browse files
authored
feat(lfs): support FastCDC media transport (#2178)
* feat(lfs): support FastCDC media transport Signed-off-by: Henry Guo <marshawcoco@gmail.com> * fix(storage): preserve object lookup errors Signed-off-by: Henry Guo <marshawcoco@gmail.com> * fix(lfs): defer HTTP response construction for errors Signed-off-by: Henry Guo <marshawcoco@gmail.com> --------- Signed-off-by: Henry Guo <marshawcoco@gmail.com>
1 parent 3d06d60 commit bb3ef17

19 files changed

Lines changed: 2599 additions & 35 deletions

File tree

Cargo.lock

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ceres/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ rand = { workspace = true, features = ["thread_rng"] }
2929
serde = { workspace = true, features = ["derive"] }
3030
serde_json = { workspace = true }
3131
sha1 = { workspace = true }
32+
sha2 = { workspace = true, optional = true }
33+
tempfile = { workspace = true, optional = true }
34+
thiserror = { workspace = true, optional = true }
3235
tracing = { workspace = true }
3336
uuid = { workspace = true, features = ["v4"] }
3437
reqwest = { workspace = true, features = ["json", "stream"] }
@@ -43,9 +46,11 @@ tokio-util = { workspace = true }
4346
rkyv = { workspace = true }
4447

4548
[features]
49+
fastcdc = ["dep:sha2", "dep:tempfile", "dep:thiserror"]
4650
migrate = ["jupiter/migrate"]
4751

4852
[dev-dependencies]
53+
sea-orm = { workspace = true }
4954
axum = { workspace = true }
5055
jupiter-migrate = { workspace = true }
5156
orion-client = { workspace = true }

ceres/src/application/api_service/mono/lfs.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ use crate::lfs::{
1414
};
1515

1616
impl LfsApplicationService {
17+
#[cfg(feature = "fastcdc")]
18+
pub fn media_service(&self) -> &jupiter::service::lfs_service::LfsService {
19+
&self.ctx.storage().lfs_service
20+
}
21+
1722
pub async fn lfs_retrieve_lock(&self, query: LockListQuery) -> Result<LockList, GitLFSError> {
1823
handler::lfs_retrieve_lock(self.ctx.storage().lfs_db_storage(), query).await
1924
}

0 commit comments

Comments
 (0)