with one click
with one click
| name | code-review |
| description | Review code with Doris-specific checklists |
| compatibility | opencode |
Complete code review work to ensure code quality. Due to the length of content, you can read sections as needed based on the actual modifications being reviewed.
Use this when you need to review code, whether it is code you just completed or directly reviewing target code.
AGENTS.md in the corresponding source directory listed in Part 2. Those files contain non-obvious conventions and traps specific to each subsystem.Always focus on the following core invariants during review:
TEMP_VERSION-style placeholders must be replaced with actual versions before useMemTracker; orphan memory is not allowedStatus; silent continuation is never allowedFor PRs with not only local minor modifications, before answering specific questions, you must read and deeply understand the complete process involved in the code modification, thoroughly comprehend the role, function, and expected functionality of the reviewed functions and modules, the actual triggering methods, potential concurrency, and lifecycle. It is necessary to understand the specific triggering methods and runtime interaction relationships, as well as dependencies, of the specific code in a concrete visual manner.
The following checkpoints must be individually confirmed with conclusions during review. If the code is too long or too complex, you should delve into the code again as needed when analyzing specific issues, especially the entire logic chain where there are doubts:
After checking all the above items with code. Use the remaining parts of this skill as needed. The following content does not need individual responses; just check during the review process.
If it involves the judgment of concurrent scenarios, it is necessary to find the starting point of concurrency and actually understand all actually possible concurrent situations (which thread initiated what at what stage, and what concurrent operations there will be). Due to the clear program semantics, some functions of the same module are executed in stages, so concurrency is definitely not present, there should be no misjudgment.
be/src/runtime/AGENTS.md)relaxed for counters only; at least acquire/release for signals and lifecycle flagsStatus must be checked; silent discard is prohibitedTHROW_IF_ERROR? (See be/src/common/AGENTS.md)DORIS_CHECK for invariants only, never speculative defensive checkstry_reserve() before large allocations, with guaranteed release on every exit pathbe/src/core/custom_allocator.h such as DorisVector, DorisMap, and DorisUniqueBufferPtr instead of std::vector, std::map, and std::unique_ptrbe/src/runtime/AGENTS.md for cache-handle, shared_ptr-cycle, and factory-creator rulesbe/src/storage/AGENTS.md for delete-bitmap sentinel replacement, MoW enablement, and serialization rulesfe/.../persist/AGENTS.md).out files must be auto-generated, never handwrittenorder_qt_ or explicit ORDER BY for deterministic outputtest { sql "..."; exception "..." }def tableNameDetailed module review guides live in AGENTS.md files in each source directory. Read the relevant file when reviewing module-specific code.
| Directory | Coverage |
|---|---|
be/src/common/AGENTS.md | Error handling and compile_check |
be/src/cloud/AGENTS.md | Cloud RPC and CloudTablet sync rules |
be/src/runtime/AGENTS.md | MemTracker, cache lifecycle, SIOF, workload-group memory tracking |
be/src/core/AGENTS.md | COW columns, type metadata, serialization compatibility |
be/src/exec/AGENTS.md | Pipeline execution, dependency concurrency, spill and memory pressure |
be/src/storage/AGENTS.md | Tablet locks, rowset lifecycle, MoW delete bitmap, segment writing |
be/src/storage/index/inverted/AGENTS.md | Inverted-index lifetime, CLucene boundary, three-valued bitmap |
be/src/storage/schema_change/AGENTS.md | Schema-change strategy, lock order, MoW catch-up flow |
be/src/io/AGENTS.md | Filesystem async path and remote reader caching |
| Directory | Coverage |
|---|---|
fe/fe-core/AGENTS.md | FE locking, exception model, visible-version semantics |
fe/fe-core/src/main/java/org/apache/doris/persist/AGENTS.md | EditLog write/replay path and transaction persistence modes |
fe/fe-core/src/main/java/org/apache/doris/nereids/AGENTS.md | Rule placement, mark-join constraints, property derivation |
fe/fe-core/src/main/java/org/apache/doris/transaction/AGENTS.md | Transaction lifecycle, publish semantics, cloud manager usage |
fe/fe-core/src/main/java/org/apache/doris/datasource/AGENTS.md | External catalog initialization and reset hazards |
fe/fe-core/src/main/java/org/apache/doris/backup/AGENTS.md | Backup/restore log timing and replay ordering |
| Directory | Coverage |
|---|---|
cloud/src/meta-store/AGENTS.md | TxnKv, key encoding, versioned values, versionstamp helpers |
cloud/src/meta-service/AGENTS.md | Cloud transaction commit paths, RPC retry contract, Cloud MoW contract |
cloud/src/recycler/AGENTS.md | Recycler safety, two-phase delete, packed-file ordering |
TPlanNodeType values have matching BE handling?order_qt_ or explicit ORDER BY used?test { sql ...; exception ... }?def tableName?.out files generated, not handwritten?TEST / TEST_F used appropriately, independent of execution order?These are cross-module patterns that cause silent or hard-to-diagnose failures. Module-specific traps are in the corresponding AGENTS.md files.
| Pattern | Risk | Why it's dangerous |
|---|---|---|
Ignored Status | Critical | Silent failure propagation; invariant violations go undetected |
THROW_IF_ERROR in Defer or destructors | Critical | Terminates during stack unwinding |
THROW_IF_ERROR without catch-and-convert boundary | High | Doris exception escapes its intended scope |
| Cross-TU static initializer dependency | High | Initialization order undefined; crashes or wrong values at startup |
use_default_implementation_for_nulls() is disabled, is the null map fully handled manually?need_replace_null_data_to_default() set correctly for garbage-payload null positions?ColumnConst(ColumnNullable(...)) handled when default null handling is disabled?IFunction subclasses carry no member state?_foreach placed correctly in registration?ColumnString offset maintenance exact (off-by-one corrupts later rows silently)?config::xxx has comments, defaults, and standard naming?std::mutex on bthread paths?bthread_usleep used instead of thread-level sleep in coroutine code?Item-by-item responses are required only for Part 1.3. Parts 2–7 are supporting material for finding bugs, stale assumptions, and missing coverage.
Fix BE (C++) code formatting issues using clang-format
Run clang-tidy on newly added/modified BE C++ code
Fix FE (Java) code style issues using Checkstyle
Run Doris docker-based regression tests from a clean package