Skip to content

feat: DDL 锁级别标识(D + L1–L8)与 codeweb conflicts (#144) - #150

Merged
c2j merged 14 commits into
mainfrom
feat/issue-144
Aug 21, 2026
Merged

c2j merged 14 commits into
mainfrom
feat/issue-144

Conversation

@c2j

@c2j c2j commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Summary

为表访问边增加正交的 D(是否 DDL)与 L1–L8(openGauss 8 级表锁)标签,并新增 codeweb conflicts 报告跨存过锁冲突。升级 ogsql-parser 到 v0.10.0(含 #321 内联 DDL 结构化 AST)。

Fixes #144
Fixes #143

Changes

  • AccessMode::Truncate 正名为 AccessExclusive(同一 0b1000 bit),补齐 L4–L7;STORE_VERSION 仍为 8,旧 store 可加载
  • 标签:DML 保持 [R] / [W:insert] / [lock]Lx 仅在最高级 ≥L4 或含 DDL 时显示;D: 由 WriteKind 纯函数推导
  • extractor 识别 ALTER/DROP TABLECREATE INDEX[+CONCURRENTLY]、LOCK TABLEVACUUM/ANALYZECLUSTERREINDEX
  • codeweb conflicts [--severity high|medium] [--format json|text] [--table NAME]:TRUNCATE vs SELECT → HIGH;两个 INSERT → 不报
  • bump ogsql-parser v0.8.33v0.10.0(内联 DDL 走 PlStatement::SqlStatement,visitor 可下钻)
  • 版本 0.9.2 → 0.9.3

Testing

  • cargo build --features full
  • cargo test --features full
  • cargo clippy --features full -- -D warnings
  • cargo fmt -- --check
  • 回归:内联 TRUNCATEEXECUTE IMMEDIATE 'TRUNCATE …'conflicts HIGH/静默 INSERT 对

Notes

  • 静态分析:「若并发执行则冲突」,非运行时一定冲突;不建模事务边界
  • LOCK TABLE / VACUUM / ANALYZE 不打 D 标签
  • MCP / HTTP 端点未做(YAGNI)

@c2j
c2j merged commit aa5d1e6 into main Aug 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant