|
@@ -1,5 +1,4 @@
|
|
|
use crate::disk::RevisionState;
|
|
|
-// use crate::history::{RevisionHistoryConfig, RevisionHistoryDiskCache, RevisionHistoryManager};
|
|
|
use crate::{RevisionPersistence, RevisionSnapshotDiskCache, RevisionSnapshotManager, WSDataProviderDataSource};
|
|
|
use bytes::Bytes;
|
|
|
use flowy_error::{FlowyError, FlowyResult};
|
|
@@ -46,7 +45,7 @@ pub struct RevisionManager {
|
|
|
user_id: String,
|
|
|
rev_id_counter: RevIdCounter,
|
|
|
rev_persistence: Arc<RevisionPersistence>,
|
|
|
- // rev_history: Arc<RevisionHistoryManager>,
|
|
|
+ #[allow(dead_code)]
|
|
|
rev_snapshot: Arc<RevisionSnapshotManager>,
|
|
|
rev_compactor: Arc<dyn RevisionCompactor>,
|
|
|
#[cfg(feature = "flowy_unit_test")]
|
|
@@ -59,25 +58,14 @@ impl RevisionManager {
|
|
|
object_id: &str,
|
|
|
rev_persistence: RevisionPersistence,
|
|
|
rev_compactor: C,
|
|
|
- // history_persistence: HP,
|
|
|
snapshot_persistence: SP,
|
|
|
) -> Self
|
|
|
where
|
|
|
- // HP: 'static + RevisionHistoryDiskCache,
|
|
|
SP: 'static + RevisionSnapshotDiskCache,
|
|
|
C: 'static + RevisionCompactor,
|
|
|
{
|
|
|
let rev_id_counter = RevIdCounter::new(0);
|
|
|
let rev_compactor = Arc::new(rev_compactor);
|
|
|
- // let history_persistence = Arc::new(history_persistence);
|
|
|
- // let rev_history_config = RevisionHistoryConfig::default();
|
|
|
- // let rev_history = Arc::new(RevisionHistoryManager::new(
|
|
|
- // user_id,
|
|
|
- // object_id,
|
|
|
- // rev_history_config,
|
|
|
- // history_persistence,
|
|
|
- // rev_compactor.clone(),
|
|
|
- // ));
|
|
|
|
|
|
let rev_persistence = Arc::new(rev_persistence);
|
|
|
|
|
@@ -90,7 +78,6 @@ impl RevisionManager {
|
|
|
user_id: user_id.to_owned(),
|
|
|
rev_id_counter,
|
|
|
rev_persistence,
|
|
|
- // rev_history,
|
|
|
rev_snapshot,
|
|
|
rev_compactor,
|
|
|
#[cfg(feature = "flowy_unit_test")]
|