直近のコードレビュー結果を対象ブランチのPRに承認として投稿し、「QUEUED FOR MERGE」ラベルを付けるスキルです。
- レビュー済みPRを承認したいとき
- マージ待ちラベルを追加したいとき
- レビュー報告をPRに投稿したいとき
QuestDBのWAL/O3テスト失敗を調べ、複合パーティションの形状や行配置を手掛かりに原因を絞り込むスキルです。
Debug a failing WAL/O3 test on the composite-partition (lazy geometry) branch — assume a partition made of several pieces over one set of column files is the fast or latent culprit
実行スコア 未検証
インストール方法を見るQuestDBのlazy geometryブランチで失敗するWAL/O3テストを調査します。複数のpiece(パーティション内の区間)を持つ複合パーティションを手掛かりに、ログやランダムシード、行数、列の位置情報をたどって、失敗を生む形状と処理を絞り込みます。固定シードで再現できるかを確かめ、可能であればファズテストに頼らない小さな決定的再現テストを組み立てます。物理行数と有効行数の違いや、ファイル行順とタイムスタンプ順の違いなど、このブランチ固有の不変条件も確認します。
WAL/O3関連のテストが不定期に失敗し、ランダムシードや実行ログから原因を追いたいときに役立ちます。複合パーティションを含む変更を調べる場合や、失敗の形状を単純化して再現可能なテストにしたい開発者にも向いています。
QuestDBのlazy geometryブランチを対象とします。資料ではJava 25の環境が指定されており、Mavenでテストを実行します。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Debug the failure described by $ARGUMENTS.
core/src/main/java/io/questdb/cairo/COMPOSITE_PARTITIONS.md — what is built, in
four short tables, plus what is not.git log --oneline lazy-geometry2 — the running record: every defect found so far and how it was
fixed. Most failures rhyme with one already in there.attachedPartitions is exactly as master has it — one 4-long record per DIRECTORY — and no partition
index ever addresses a piece.
_txn record, one directory, one set of
column files.(tsLo, tsHi, rowOffset, rowCount) inside that directory's _geometry. Pieces exist ONLY
there; nothing outside PartitionGeometry, the planner, the executor and the two frame cursors sees
them._txn records._txn slot 3 carries a geometry pointer. NO_GEOMETRY_REF == 0.Every one of these has produced at least one defect. When something is wrong, suspect them in order.
[columnTop, physicalRows) via TableWriter.getPartitionFileRowCount.
Using live rows there silently drops every relocated piece's rows.CompositeTimestampFinder and the covering sidecar.commitUpdate/publish rebuild it. Nothing
mid-apply may read it as authoritative.findPiece and
findPieceByRow are binary searches and getPieceCumulativeLo is a slot read.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.
grep -n "merge-append composite partition" run.log
One INFO line per partition per commit:
merge-append composite partition [table=, ts=, pieces=A->B, composite=, keep=, merge=, newPiece=,
liveRows=A->B, physicalRows=A->B, deadPct=]
debug-fuzz skill.Instrument the correct generateRandom call with the seeds. Run the test once: if it fails — i.e. it
reproduces the bug — good, there is a 100% repeatable reproducer. Next step is to create a minimum
deterministic reproducer without the fuzz framework.
If it does not fail, try running it a few more times. Some tests fail only under parallel writing, or because of races, and only some of the time. If the test fails with the fixed seeds once in a while — say 1 out of 10 — it is still somewhat repeatable and can be used for Step 4.
If it never fails, or fails rarely with different symptoms each time, report back and stop investigation.
Random-seed replay is not reliable on its own: WAL application runs on a real thread pool, and
record order under concurrent writing is not guaranteed for a given seed even with the
data-generation Rnd stream pinned. Don't burn more than one attempt on new Rnd(s0, s1) before
moving to the loop below — this branch's own history already confirms a fixed-seed replay can pass
cleanly against the exact code and log that caught it.
LOG.info() at the point that plans or executes the
composite write (assembleFreshPartitionVersion, executeCompositePlan, or wherever step 2
pointed) that dumps, for the commit about to run: every action's
type/pieceIndex/o3Lo/o3Hi/pieceLo/pieceHi/tsLo/tsHi, and the current per-column tops
(columnVersionReader.getColumnTop(ts, col)) for the columns in play. describePieces(tableName)
in O3PartitionPreSplitTest is the existing print for a geometry's pieces alone
(pieces=[i:[tsLo..tsHi]@rowOffset+rowCount, ...] E=) if that's all a given theory needs.CairoException's srcOffset/size back into piece bounds via the column's byte width) and
name which piece and which prior action produced the wrong value. A theory that doesn't
reproduce the crash's own numbers by arithmetic is not yet the right theory.O3CompositePartitionTest or O3PartitionPreSplitTest — the
fuzz run's exact row counts and timestamps don't matter, only the qualitative structure the
theory depends on. Replay just the last few transactions/apply iterations identified in step 2,
in order, against that constructed shape. If the shape genuinely can't be built deterministically
(a cross-thread timing race, not a sequence-dependent one), say so explicitly and fall back to confirming the fix via repeated fuzz runs instead.Remove the temporary logging from step 1 before the fix ships.
JAVA_HOME must be Java 25: /opt/homebrew/opt/java/libexec/openjdk.jdk/Contents/Home.mvn -Dtest='A+B' selects NOTHING and passes vacuously. Use -Dtest=ClassName or
-Dtest.include="%regex[.*/ClassName.*]", and confirm against surefire report MTIMES.core/target produces bogus runs — 0 tests
selected, or a subset. If a count looks wrong, that is why, not the change under test.core/hs_err_pid*.log; its "Problematic frame" plus the Java frames under it name
the offending call directly. Surefire reports it as "The forked VM terminated without properly saying
goodbye".まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
直近のコードレビュー結果を対象ブランチのPRに承認として投稿し、「QUEUED FOR MERGE」ラベルを付けるスキルです。
WALファジーテストの失敗を、固定シードから再現し、列型変換やParquet・ネイティブ形式間の変換履歴とパーティション状態を追って原因を絞り込むスキルです。
PRのCI状況を確認し、失敗したテストやビルドの内容を調べて原因を分類します。機械的に直せる期待値のずれは修正し、判断が必要な問題は利用者に相談します。
QuestDBのPR指摘を原因や呼び出し元への影響まで調べ、設計レビューと回帰テストを経て適切な修正を進めるスキルです。
QuestDBのPRレビューで指摘された項目を一件ずつ検証し、必要に応じて再現テスト、修正、テスト実行、独立レビューまで進めるスキルです。
QuestDBのPRレビュー指摘を一件ずつ検証し、影響を確かめたうえで回帰テストと独立レビューを通して修正するスキルです。