{"record":{"id":"e2393fbd7e3e1358","repo":"dbt-labs/dbt-core","slug":"create-view-should-still-be-matched-as-a-write-bar","errorCode":null,"errorMessage":"CREATE VIEW should still be matched as a write barrier","messagePattern":"CREATE VIEW should still be matched as a write barrier","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/time_machine/event_replay.rs","lineNumber":3212,"sourceCode":"        ]);\n\n        // Fusion replay order: DATEDIFF_PROBE first, then SHOW_PARAMS, then CREATE_VIEW\n        let probe_args = serde_json::json!([probe_sql]);\n        let e = recording\n            .take_semantic_match(node_id, \"execute\", &probe_args, SemanticCategory::Write)\n            .expect(\"probe should be found as untracked read in segment\");\n        assert_eq!(e.seq, 1);\n\n        let show_args = serde_json::json!([show_sql]);\n        let e = recording\n            .take_semantic_match(node_id, \"execute\", &show_args, SemanticCategory::Write)\n            .expect(\"SHOW PARAMETERS should be found as untracked read in segment\");\n        assert_eq!(e.seq, 0);\n\n        let ddl_args = serde_json::json!([ddl_sql]);\n        let e = recording\n            .take_semantic_match(node_id, \"execute\", &ddl_args, SemanticCategory::Write)\n            .expect(\"CREATE VIEW should still be matched as a write barrier\");\n        assert_eq!(e.seq, 2);\n    }\n\n    /// In strict mode, read-only execute calls (SELECT/SHOW) should be matched globally\n    /// via take_ro_exec_read and should not consume the sequential write slot.\n    #[test]\n    fn test_strict_mode_read_only_execute_global_match() {\n        let node_id = \"model.project.date_details\";\n        let show_sql = \"show parameters like 'query_tag' in session\";\n        let probe_sql = \"select datediff(day, '2018-12-31'::date, sysdate()::date)\";\n        let ddl_sql = \"create or replace view analytics.public.date_details as (select 1)\";\n\n        let make_exec = |seq: u32, sql: &str| AdapterCallEvent {\n            node_id: node_id.to_string(),\n            seq,\n            method: \"execute\".to_string(),\n            semantic_category: SemanticCategory::Write,\n            args: serde_json::json!([sql]),","sourceCodeStart":3194,"sourceCodeEnd":3230,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/time_machine/event_replay.rs#L3194-L3230","documentation":"Test-only assertion in the out-of-order replay test: after the probe and SHOW PARAMETERS reads matched, the CREATE VIEW DDL must still be matched as a write barrier in sequence order. Fires only if write-barrier matching breaks once earlier reads were consumed out of order.","triggerScenarios":"Thrown at crates/dbt-adapter/src/time_machine/event_replay.rs:3212 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify write events are matched by seq order after out-of-order read consumption","Check the write-barrier logic in take_semantic_match","Treat failure as an event-replay determinism regression"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}