Skip to content

Commit bb60351

Browse files
committed
docs(cluster): annotate intentional determinism/plane-separation sites
Add no-determinism and no-plane-separation comments explaining why these Instant/oneshot usages are safe, so CI gate scripts recognize them as reviewed exceptions rather than flagging them.
1 parent c34265d commit bb60351

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

nodedb/src/control/cluster/calvin/scheduler/driver/core/commit_resolve.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ impl Scheduler {
8787
match self.pending.get_mut(&txn_id) {
8888
Some(pending) => {
8989
pending.commit_state = Some(CommitState::AwaitingVerdict);
90+
// no-determinism: local stall-warning deadline only; the global replicated verdict, not this wall-clock, decides commit/abort.
9091
pending.verdict_deadline = Some(Instant::now() + self.config.verdict_stall_warn());
9192
}
9293
None => return,
@@ -210,6 +211,7 @@ impl Scheduler {
210211
pub(in crate::control::cluster::calvin::scheduler::driver::core) fn check_awaiting_verdict_stalls(
211212
&mut self,
212213
) {
214+
// no-determinism: stall-detection clock drives warnings/metrics only; this path holds locks and never aborts, so it cannot affect the replicated outcome.
213215
let now = Instant::now();
214216
let stalled: Vec<TxnId> = self
215217
.pending

nodedb/src/control/cluster/calvin/scheduler/driver/core/tests.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ async fn in_flight_guard_skips_replayed_txn_already_in_flight() {
231231
super::super::types::BlockedTxn {
232232
txn: txn.clone(),
233233
keys: BTreeSet::new(),
234+
// no-determinism: test-only blocked_at timestamp for a fabricated BlockedTxn fixture.
234235
blocked_at: std::time::Instant::now(),
235236
},
236237
);
@@ -314,6 +315,7 @@ fn ensure_sequencer_leader(scheduler: &Scheduler) {
314315
// Force the election timeout to fire on the next tick so the single voter
315316
// campaigns and wins immediately (majority = itself).
316317
if let Some(node) = mr.groups_mut().get_mut(&SEQUENCER_GROUP_ID) {
318+
// no-determinism: test-only forced election deadline so the single voter campaigns immediately.
317319
node.election_deadline_override(Instant::now() - Duration::from_millis(1));
318320
}
319321
for _ in 0..20 {

nodedb/src/data/runtime/params.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,6 @@ pub struct SpawnCoreParams<'a> {
6262
/// WAL — which would otherwise let a just-restarted node serve half-rebuilt
6363
/// results. Dropped without firing if the core panics during open/replay,
6464
/// which surfaces to boot as a failed readiness gate.
65+
// no-plane-separation: passive one-shot readiness Sender, fired once (`send(())`, synchronous and runtime-free) at the end of WAL replay to signal Boot; no tokio runtime or tasks run in the Data Plane.
6566
pub replay_done: tokio::sync::oneshot::Sender<()>,
6667
}

0 commit comments

Comments
 (0)