mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
nit: upgrade DB version (#11581)
This commit is contained in:
@@ -35,11 +35,13 @@ pub use model::Stage1StartupClaimParams;
|
|||||||
pub use model::ThreadMetadata;
|
pub use model::ThreadMetadata;
|
||||||
pub use model::ThreadMetadataBuilder;
|
pub use model::ThreadMetadataBuilder;
|
||||||
pub use model::ThreadsPage;
|
pub use model::ThreadsPage;
|
||||||
pub use runtime::STATE_DB_FILENAME;
|
|
||||||
pub use runtime::STATE_DB_VERSION;
|
|
||||||
pub use runtime::state_db_filename;
|
pub use runtime::state_db_filename;
|
||||||
pub use runtime::state_db_path;
|
pub use runtime::state_db_path;
|
||||||
|
|
||||||
|
pub const STATE_DB_FILENAME: &str = "state";
|
||||||
|
pub const STATE_DB_VERSION: u32 = 5;
|
||||||
|
|
||||||
|
const METRIC_DB_INIT: &str = "codex.db.init";
|
||||||
/// Errors encountered during DB operations. Tags: [stage]
|
/// Errors encountered during DB operations. Tags: [stage]
|
||||||
pub const DB_ERROR_METRIC: &str = "codex.db.error";
|
pub const DB_ERROR_METRIC: &str = "codex.db.error";
|
||||||
/// Metrics on backfill process. Tags: [status]
|
/// Metrics on backfill process. Tags: [status]
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ use crate::DB_ERROR_METRIC;
|
|||||||
use crate::LogEntry;
|
use crate::LogEntry;
|
||||||
use crate::LogQuery;
|
use crate::LogQuery;
|
||||||
use crate::LogRow;
|
use crate::LogRow;
|
||||||
|
use crate::METRIC_DB_INIT;
|
||||||
|
use crate::STATE_DB_FILENAME;
|
||||||
|
use crate::STATE_DB_VERSION;
|
||||||
use crate::SortKey;
|
use crate::SortKey;
|
||||||
use crate::ThreadMetadata;
|
use crate::ThreadMetadata;
|
||||||
use crate::ThreadMetadataBuilder;
|
use crate::ThreadMetadataBuilder;
|
||||||
@@ -36,11 +39,6 @@ use std::time::Duration;
|
|||||||
use tracing::warn;
|
use tracing::warn;
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
pub const STATE_DB_FILENAME: &str = "state";
|
|
||||||
pub const STATE_DB_VERSION: u32 = 4;
|
|
||||||
|
|
||||||
const METRIC_DB_INIT: &str = "codex.db.init";
|
|
||||||
|
|
||||||
mod memories;
|
mod memories;
|
||||||
// Memory-specific CRUD and phase job lifecycle methods live in `runtime/memories.rs`.
|
// Memory-specific CRUD and phase job lifecycle methods live in `runtime/memories.rs`.
|
||||||
|
|
||||||
@@ -904,11 +902,11 @@ fn push_thread_order_and_limit(
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::STATE_DB_FILENAME;
|
|
||||||
use super::STATE_DB_VERSION;
|
|
||||||
use super::StateRuntime;
|
use super::StateRuntime;
|
||||||
use super::ThreadMetadata;
|
use super::ThreadMetadata;
|
||||||
use super::state_db_filename;
|
use super::state_db_filename;
|
||||||
|
use crate::STATE_DB_FILENAME;
|
||||||
|
use crate::STATE_DB_VERSION;
|
||||||
use crate::model::Phase2JobClaimOutcome;
|
use crate::model::Phase2JobClaimOutcome;
|
||||||
use crate::model::Stage1JobClaimOutcome;
|
use crate::model::Stage1JobClaimOutcome;
|
||||||
use crate::model::Stage1StartupClaimParams;
|
use crate::model::Stage1StartupClaimParams;
|
||||||
|
|||||||
Reference in New Issue
Block a user