Skip to main content
← Back to list
01Issue
BugTriagedSwamp Club
Assigneesstack72

#384 identity_map row not updated when user renames

Opened by keeb · 5/20/2026

Description

When a user changes their username, the user collection updates correctly but the identity_map collection retains a stale row keyed by the old username. The orphan has its last_updated field touched at the time of the rename, but its username value is not changed and distinct_ids remains empty.

Reproduction

  1. User signs up with username X (creates user.{username: "X"} and identity_map.{username: "X"}).
  2. User renames to Y from their profile.
  3. Verify:
    • user.find({username: "X"}) → no result
    • user.find({username: "Y"}) → exists, with updatedAt reflecting the rename
    • identity_map.find({username: "X"})still exists, with last_updated near the rename time and distinct_ids: []

Concrete instance (2026-05-20)

  • _id 6a0d4d57d254acc8f6495b91
  • createdAt 2026-05-20T05:57:43.001Z (signed up as yy)
  • updatedAt 2026-05-20T05:58:30.720Z (renamed to zz, 47s later)
  • Current user.username = zz
  • Orphan: identity_map.{username: "yy"} with last_updated: 2026-05-20T05:57:56.230Z, distinct_ids: []

Expected

One of:

  • identity_map row is deleted on rename, OR
  • identity_map.username is updated to the new value, OR
  • The old username is moved into distinct_ids of the row keyed by the new username, so rename history is preserved usefully.

Impact

  • identity_map reads return misleading hits for renamed users.
  • Downstream joins against user produce orphans.
  • Rename history is partially captured (last_updated touched) but not actionable.
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW

Triaged

5/22/2026, 4:39:35 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack725/22/2026, 4:33:10 PM

Sign in to post a ripple.