diff --git a/optd-persistent/init.db b/optd-persistent/init.db
deleted file mode 100644
index fe10513..0000000
Binary files a/optd-persistent/init.db and /dev/null differ
diff --git a/optd-persistent/src/cost_model/interface.rs b/optd-persistent/src/cost_model/interface.rs
index b4e27c7..d8dfcdf 100644
--- a/optd-persistent/src/cost_model/interface.rs
+++ b/optd-persistent/src/cost_model/interface.rs
@@ -42,6 +42,14 @@ pub enum StatType {
Max,
}
+#[derive(PartialEq)]
+pub enum EpochOption {
+ // TODO(lanlou): Could I make i32 -> EpochId?
+ Existed(i32),
+ New(String, String),
+}
+
+#[derive(Clone)]
pub struct Stat {
pub stat_type: i32,
pub stat_value: Json,
@@ -72,7 +80,11 @@ pub trait CostModelStorageLayer {
epoch_id: Self::EpochId,
) -> StorageResult<()>;
- async fn update_stats(&self, stat: Stat, epoch_id: Self::EpochId) -> StorageResult<()>;
+ async fn update_stats(
+ &mut self,
+ stat: Stat,
+ epoch_option: EpochOption,
+ ) -> StorageResult