dbt-labs/dbt-core · error
CREATE VIEW should be the next sequential event
Error message
CREATE VIEW should be the next sequential event
What it means
Test-only assertion in the strict-mode replay test: after the two out-of-order reads matched globally, the CREATE VIEW write must be the next event matched in sequential order (seq 2). Fires only if write ordering breaks after global read matches.
Solutions
- Verify sequential write matching resumes correctly after global read consumption
- Check the seq cursor advancement logic in strict replay
- Treat failure as an event-replay determinism regression
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/dbt-adapter/src/time_machine/event_replay.rs:3262 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07).
Data as JSON: /api/errors/028ba59e87de12fa.
Report an issue: GitHub.
Appendix: source
Thrown at crates/dbt-adapter/src/time_machine/event_replay.rs:3262
// Strict mode replay: DATEDIFF_PROBE arrives first via global read search
let probe_args = serde_json::json!([probe_sql]);
let e = recording
.take_ro_exec_read(node_id, "execute", &probe_args)
.expect("probe should be matched globally");
assert_eq!(e.seq, 1, "should match the probe event (seq 1)");
// SHOW_PARAMS also arrives out of order; matched globally
let show_args = serde_json::json!([show_sql]);
let e = recording
.take_ro_exec_read(node_id, "execute", &show_args)
.expect("SHOW PARAMETERS should be matched globally");
assert_eq!(e.seq, 0);
// take_next (strict sequential) should skip seq 0 and seq 1 (already consumed
// as read-only execute reads) and return seq 2 (CREATE_VIEW).
let e = recording
.take_next(node_id)
.expect("CREATE VIEW should be the next sequential event");
assert_eq!(
e.seq, 2,
"take_next should skip ro_exec_matched events and return CREATE_VIEW"
);
}
#[test]
fn test_sql_args_match_string_format() {
// Test that SQL can be passed as a direct string (not wrapped in array)
let sql1 = serde_json::json!("SELECT * FROM users");
let sql2 = serde_json::json!("SELECT * FROM users");
assert!(
sql_args_match(&sql1, &sql2, AdapterType::Snowflake),
"Direct SQL strings should be matched with fuzzy comparison"
);
}
#[test]View on GitHub (pinned to 0267ce9170)