Skip to content

hash migration (server): distance index keeps the old time when a merge moves FirstSeen back #288

Description

@dborup

Found in a post-merge review of #222 and confirmed by reading master 34f672c6.

After an in-memory merge, cmd/server/hash_migrate.go (code) calls updateDistanceIndexForTxs only for survivors whose PathJSON changed. When the merge moves FirstSeen earlier but the path stays the same, the distance index keeps the old time. The review's reproduction moves a packet from 13:29 to 11:29, but the distance graph's time field and hour bucket stay at 13:29.

Expected

Refresh the distance index for survivors whose FirstSeen moved, as well as for those whose path changed.

Tests

  • A merge that moves FirstSeen without changing the path: the distance entry has the new time and hour bucket.
  • The mutant that updates only on a path change must fail.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtype:bugSomething broken

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions