Skip to content

Some comments in RC dumps have a numeric parent_id; the API returns the post as their parent #88

Open

Description

@osjerick

In the comment dumps from the bundle torrent (3d426c47c767d40f82c7ef0f47c3acacedd2bf44), some rows have parent_id as a JSON number instead of a string. The number is the parent comment's ID in base 10 instead of base 36, without the t1_ prefix. Converting it back gives the parent Reddit shows.

For the same comments, the API returns the post as the parent.

Example

jmetbj1 in r/confidence, from RC_2023-06.zst. In the dump, with the other fields left out:

{"id":"jmetbj1","link_id":"t3_bx2mct","parent_id":32053427645}

32053427645 in base 36 is eq3s725. On Reddit, jmetbj1 is a reply to eq3s725: https://www.reddit.com/r/confidence/comments/bx2mct/comment/eq3s725/

The API returns t3_bx2mct, the post, as the parent:

https://arctic-shift.photon-reddit.com/api/comments/ids?ids=jmetbj1&fields=id,link_id,parent_id

The same holds for other affected comments we looked up: jmet33d, jmet3ao, jmetepz and jmeth2f. In each case the decoded number is an older comment in the same thread, and the API returns the post as the parent.

Where we've seen it

  • Every comment file in the bundle from RC_2023-04 to RC_2024-03 has these rows; the first one is between line 220 and line 73,052,383, depending on the month.
  • In the first 160,000 rows of a file, 461 have a number in RC_2023-04 and 235 in RC_2023-06. None of those numbers is the row's own post ID.
  • RC_2022-02 to RC_2023-03 from the bundle have none, in the whole file.
  • Neither do the per-month torrents we've read in full: RC_2024-04, RC_2024-06 to RC_2024-08, RC_2025-01 to RC_2026-06, and RC_2026-09.
  • We've only seen this in parent_id.

schemas/RC/2023/RC_2023-06.json lists parent_id as always a string, so the numbers don't show up there.

Reproduce

zstd -dc --long=31 RC_2023-06.zst | head -n 160000 \
  | jq -c 'select(.parent_id|type=="number") | {id, link_id, parent_id}' | head

Check the match in Python:

int("eq3s725", 36)  # 32053427645

Thanks for maintaining the archive!

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions