Merge pull request #761 from fabro-sh/codex/strict-legacy-blob-import

Import legacy blobs strictly into SQLite
This commit is contained in:
Scott Werner 2026-08-21 16:30:45 -04:00 committed by GitHub
commit 891eb43e9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 1564 additions and 1 deletions

View file

@ -77,6 +77,13 @@ impl BlobStore {
}
}
pub(crate) fn sqlite_pool_for_legacy_import(&self) -> Option<&SqlitePool> {
match &self.backend {
BlobBackend::Slate(_) => None,
BlobBackend::Sqlite(pool) => Some(pool),
}
}
pub async fn write(&self, bytes: &[u8]) -> Result<BlobHash> {
match &self.backend {
BlobBackend::Slate(repo) => {

File diff suppressed because it is too large Load diff

View file

@ -5,6 +5,7 @@ mod blob_store;
mod error;
mod keyed_mutex;
mod keys;
mod legacy_blob_import;
mod record;
mod run_sessions;
mod run_state;
@ -25,6 +26,7 @@ pub use fabro_types::{
BlobHash, EventEnvelope, PendingInterviewRecord, Run, RunProjection, StageId, StageProjection,
};
pub use keyed_mutex::{KeyedMutex, KeyedMutexGuard};
pub use legacy_blob_import::{LegacyBlobImportError, LegacyBlobImportReport};
pub use run_sessions::{
ProjectedRunSession, project_run_session, project_run_session_with_context,
project_run_sessions,

View file

@ -100,7 +100,7 @@ impl Database {
self.base_prefix.clone()
}
async fn open_db(&self) -> Result<slatedb::Db> {
pub(crate) async fn open_db(&self) -> Result<slatedb::Db> {
let db = self
.db
.get_or_try_init(|| async {