Skip to content

Commit 43a1bfc

Browse files
authored
feat: remove LegacyHistory store version (#1674)
1 parent 757bf13 commit 43a1bfc

File tree

5 files changed

+45
-268
lines changed

5 files changed

+45
-268
lines changed

crates/storage/src/versioned/id_indexed_v1/migration.rs

Lines changed: 0 additions & 179 deletions
This file was deleted.

crates/storage/src/versioned/id_indexed_v1/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
mod config;
2-
mod migration;
32
mod pruning_strategy;
43
pub(super) mod sql;
54
mod store;

crates/storage/src/versioned/id_indexed_v1/store.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ use rusqlite::{named_params, types::Type, OptionalExtension};
77
use tracing::{debug, error, warn};
88
use trin_metrics::storage::StorageMetricsReporter;
99

10-
use super::{
11-
migration::migrate_legacy_history_store, pruning_strategy::PruningStrategy, sql,
12-
IdIndexedV1StoreConfig,
13-
};
10+
use super::{pruning_strategy::PruningStrategy, sql, IdIndexedV1StoreConfig};
1411
use crate::{
1512
error::ContentStoreError,
1613
utils::get_total_size_of_directory_in_bytes,
@@ -63,13 +60,10 @@ impl<TContentKey: OverlayContentKey> VersionedContentStore for IdIndexedV1Store<
6360
}
6461

6562
fn migrate_from(
66-
content_type: &ContentType,
63+
_content_type: &ContentType,
6764
old_version: StoreVersion,
68-
config: &Self::Config,
65+
_config: &Self::Config,
6966
) -> Result<(), ContentStoreError> {
70-
if content_type == &ContentType::History && old_version == StoreVersion::LegacyHistory {
71-
return migrate_legacy_history_store(config);
72-
}
7367
Err(ContentStoreError::UnsupportedStoreMigration {
7468
old_version,
7569
new_version: Self::version(),

crates/storage/src/versioned/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@ pub enum ContentType {
3232
#[derive(Clone, Debug, Display, Eq, PartialEq, EnumString, AsRefStr)]
3333
#[strum(serialize_all = "snake_case")]
3434
pub enum StoreVersion {
35+
/// The mock content store that can be used for tests. Implementation:
36+
/// [utils::MockContentStore].
37+
MockContentStore,
3538
/// The store designed for content-id, content-key and content-value objects.
3639
/// The content from different subnetwork (expressed with `ContentType`)
37-
/// uses different table. NOTE: implementation is in progress.
40+
/// uses different table. Implementation: [IdIndexedV1Store].
3841
IdIndexedV1,
39-
/// The original SQLite version of the history storage store.
40-
LegacyHistory,
4142
}
4243

4344
impl FromSql for StoreVersion {

0 commit comments

Comments
 (0)