mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
nit: add DB version is discrepancy recording (#10762)
This commit is contained in:
1 parent
901215e310
commit
68e82e5dc9
2 files changed
+7
-2
No files matched your search
@@ -14,6 +14,7 @@ use codex_protocol::protocol::RolloutItem;
|
|||||||
use codex_protocol::protocol::SessionSource;
|
use codex_protocol::protocol::SessionSource;
|
||||||
use codex_state::DB_METRIC_COMPARE_ERROR;
|
use codex_state::DB_METRIC_COMPARE_ERROR;
|
||||||
pub use codex_state::LogEntry;
|
pub use codex_state::LogEntry;
|
||||||
|
use codex_state::STATE_DB_VERSION;
|
||||||
use codex_state::ThreadMetadataBuilder;
|
use codex_state::ThreadMetadataBuilder;
|
||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
@@ -504,7 +505,11 @@ pub fn record_discrepancy(stage: &str, reason: &str) {
|
|||||||
let _ = metric.counter(
|
let _ = metric.counter(
|
||||||
DB_METRIC_COMPARE_ERROR,
|
DB_METRIC_COMPARE_ERROR,
|
||||||
1,
|
1,
|
||||||
&[("stage", stage), ("reason", reason)],
|
&[
|
||||||
|
("stage", stage),
|
||||||
|
("reason", reason),
|
||||||
|
("version", &STATE_DB_VERSION.to_string()),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ use std::time::Duration;
|
|||||||
use tracing::warn;
|
use tracing::warn;
|
||||||
|
|
||||||
pub const STATE_DB_FILENAME: &str = "state";
|
pub const STATE_DB_FILENAME: &str = "state";
|
||||||
pub const STATE_DB_VERSION: u32 = 2;
|
pub const STATE_DB_VERSION: u32 = 3;
|
||||||
|
|
||||||
const METRIC_DB_INIT: &str = "codex.db.init";
|
const METRIC_DB_INIT: &str = "codex.db.init";
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user