直近のコードレビュー結果を対象ブランチのPRに承認として投稿し、「QUEUED FOR MERGE」ラベルを付けるスキルです。
- レビュー済みPRを承認したいとき
- マージ待ちラベルを追加したいとき
- レビュー報告をPRに投稿したいとき
WALファジーテストの失敗を、固定シードから再現し、列型変換やParquet・ネイティブ形式間の変換履歴とパーティション状態を追って原因を絞り込むスキルです。
Debug a failing WAL fuzz test involving column conversions and parquet partitions
実行スコア 未検証
インストール方法を見るdebug-fuzz は、QuestDBのWALファジーテストで列変換やParquetパーティションに関係する失敗を調べます。失敗ログやテスト名から乱数シードを確認し、同じ操作列を再現できる状態かを見ます。そのうえで、非WALテーブルを基準として、WALの逐次・並列処理との結果差を追跡します。列の追加・削除・改名、型変換の連鎖、パーティション形式の変換や削除を時系列で整理し、失敗行がどのパーティションにあり、列の型やcolumn topがどう変化したかを確認します。必要に応じて、各トランザクション後のテーブル状態を記録する一時ログを追加して根本原因を絞ります。
固定シードのWALテストが失敗し、列の値や型が非WAL側と一致しないときに使えます。Parquetとの往復後の値違い、NULLと番兵値の違い、列追加後のパーティション状態などを追う調査に向いています。
テストの実行例ではMavenを使います。失敗を再現できるシードが必要です。ファズテストの操作列を保つため、テスト回数・確率・機能フラグは変更せず、一時的なデバッグログで状態を確認します。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Debug the fuzz test failure described by $ARGUMENTS.
WAL fuzz tests (WalWriterFuzzTest, AbstractFuzzTest) are nearly deterministic with fixed
seeds. The same seeds produce the same sequence of operations. Failures reproduce reliably
once you have the seeds.
The test applies the same randomly-generated transactions three ways:
TestUtils.assertSqlCursors() compares WAL tables against non-WAL. The assertion format is:
Row N column COL[TYPE] expected:<X> but was:<Y>.
Find the random seeds in the test output:
random seeds: 137113830825708L, 1776424558803L
If the user provided a failure log, extract the seeds from there and compare them against
the seeds currently hardcoded in the test method. If the test uses generateRandom(LOG)
(no fixed seeds), note this — you'll need to hardcode the failing seeds to reproduce later.
If the seeds are already hardcoded in the test and match the failure log, no reproduction step is needed — proceed directly to tracing.
This is the most important step for conversion-related failures. For each column involved in the assertion failure, build a chronological timeline of:
Column add — when the column was added, which partitions already existed. Partitions created before the column was added have a column top (the column starts at a row offset within that partition, not at row 0).
Column delete / rename — removals and renames that affect the column index chain.
Column type conversions (ALTER COLUMN TYPE) — each conversion creates a new column
index via replacingIndex. Track the full chain of types (e.g., INT → STRING → DATE).
Key file: ConvertOperatorImpl.java.
Partition format conversions — CONVERT PARTITION TO PARQUET and TO NATIVE.
A parquet partition freezes the column type at conversion time. If a type change happened
after parquet conversion, the parquet partition stores the old type. The
ConvertOperatorImpl pre-pass converts parquet partitions to native when needed
(chained conversions, symbol targets).
Partition truncations (DROP PARTITION) — partitions removed mid-sequence change
what data exists when later operations run.
Use Grep to search the fuzz generator and operation classes for LOG statements that
trace these operations:
core/src/test/java/io/questdb/test/cairo/fuzz/FuzzChangeColumnTypeOperation.java
core/src/test/java/io/questdb/test/cairo/fuzz/FuzzConvertPartitionToParquetOperation.java
core/src/test/java/io/questdb/test/cairo/fuzz/FuzzConvertPartitionToNativeOperation.java
core/src/test/java/io/questdb/test/cairo/fuzz/FuzzTransactionGenerator.java
core/src/main/java/io/questdb/griffin/ConvertOperatorImpl.java
Map the failing assertion back to the timeline:
Do NOT change fuzz counts, probabilities, or feature gates. Fuzz tests are extremely sensitive to any modification — even a tiny change alters the random sequence and produces completely different transactions, making the failure non-reproducible.
Instead, add temporary debug logging to dump table state after each transaction. Useful things to log after each WAL apply / transaction commit:
replacingIndex chain) across all partitionsreplacingIndex chainAdd logging in AbstractFuzzTest.runFuzz() or in the WAL apply loop. For example, after
each transaction is applied, iterate over partitions and dump the state of the columns
involved in the failure.
Also useful:
node1.setProperty(PropertyKey.DEBUG_WAL_APPLY_BLOCK_FAILURE_NO_RETRY, true);
Common failure patterns:
| Symptom | Likely cause | Where to look |
|---|---|---|
| Data mismatch after parquet round-trip | Parquet decoder type mapping | core/rust/qdbr/src/parquet_read/decode.rs |
| Wrong value in converted column | Pre-pass missed a parquet partition | ConvertOperatorImpl.java pre-pass logic |
| Symbol column errors from parquet | Parquet not converted to native before symbol conversion | ConvertOperatorImpl.java isTargetSymbol check |
| NULL vs sentinel mismatch | Type conversion doesn't handle NULL for non-nullable types | Conversion logic for BYTE/SHORT/BOOLEAN |
| Column top mismatch | Column top not propagated to new column index | columnVersionWriter.upsertColumnTop() in ConvertOperatorImpl |
core/src/test/java/io/questdb/test/cairo/fuzz/WalWriterFuzzTest.java — test entry pointscore/src/test/java/io/questdb/test/cairo/fuzz/AbstractFuzzTest.java — runFuzz(), comparison logiccore/src/test/java/io/questdb/test/cairo/fuzz/FuzzTransactionGenerator.java — operation generationcore/src/test/java/io/questdb/test/cairo/fuzz/FuzzChangeColumnTypeOperation.java — type change logiccore/src/main/java/io/questdb/griffin/ConvertOperatorImpl.java — column type conversion enginecore/src/main/java/io/questdb/cairo/TableWriter.java — partition format, column topscore/rust/qdbr/src/parquet_read/decode.rs — parquet type decoding# Single method from repo root
mvn test --batch-mode \
-Dtest.include="%regex[.*WalWriterFuzzTest.*]" \
-Dtest="**/WalWriterFuzzTest.java#testConvertPartitionToParquet" \
-DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false \
-pl questdb/core
まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
直近のコードレビュー結果を対象ブランチのPRに承認として投稿し、「QUEUED FOR MERGE」ラベルを付けるスキルです。
QuestDBのWAL/O3テスト失敗を調べ、複合パーティションの形状や行配置を手掛かりに原因を絞り込むスキルです。
PRのCI状況を確認し、失敗したテストやビルドの内容を調べて原因を分類します。機械的に直せる期待値のずれは修正し、判断が必要な問題は利用者に相談します。
QuestDBのPR指摘を原因や呼び出し元への影響まで調べ、設計レビューと回帰テストを経て適切な修正を進めるスキルです。
QuestDBのPRレビューで指摘された項目を一件ずつ検証し、必要に応じて再現テスト、修正、テスト実行、独立レビューまで進めるスキルです。
QuestDBのPRレビュー指摘を一件ずつ検証し、影響を確かめたうえで回帰テストと独立レビューを通して修正するスキルです。