Ray's Knowledge Base
Unlock

A stored aggregation tier of another version was re-aggregated over its old rows and counted events twice

PitfallVerified 1 Oct 2026Holds project: dftracer-utils
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.

Symptom#

After a bump of the aggregation (AGG) extension version, an index built by the older version gave double counts: 100 events for a file with 50 events.

Cause#

When the stored aggregation tier had another version, the resolver aggregated again on top of the old rows. It did not remove the old rows first.

Fix#

The resolver now clears the tier and rebuilds it when the stored version differs. This also covers the earlier bump from version 1 to 2. Keep a test that says "an older index is rebuilt" for each version bump; that test found this bug.

Evidence#

Found on 2026-10-01 during the stable-variance change (AGG version 2 to 3), by a new test with a planted manifest entry of the older version. An index built by a real older binary was not tested.