Page MenuHomePhabricator

Index only the first 1,000 comments on any object
ClosedPublic

Authored by epriestley on Jun 22 2018, 4:10 PM.
Tags
None
Referenced Files
F18104256: D19503.id46634.diff
Sun, Aug 10, 10:59 AM
F18104107: D19503.id46640.diff
Sun, Aug 10, 9:57 AM
F18099216: D19503.id.diff
Sat, Aug 9, 2:49 AM
F18098546: D19503.diff
Fri, Aug 8, 8:56 PM
F17754699: D19503.id46640.diff
Jul 22 2025, 11:12 AM
F17737059: D19503.diff
Jul 20 2025, 7:13 PM
Unknown Object (File)
Jun 30 2025, 10:28 AM
Unknown Object (File)
Jun 29 2025, 5:07 AM
Subscribers
None

Details

Summary

Depends on D19502. Ref T13151. See PHI719. An install ended up with an object with 111,000+ comments on it because someone wrote a script to treat it like a logfile.

Although we seem to do mostly okay with this (locally, it only takes about 30s to index a similar object) we'll hit a wall somewhere (since we need to hold everything in memory), and it's hard to imagine a legitimate object with more than 1,000 comments. Just ignore comments past the first thousand.

(Conpherence threads may legitimately have more than 1,000 comments, but go through a different indexer.)

Test Plan
  • Piped some comments into maniphest.edit in a loop to create a task with 100K comments.
  • Ran bin/search index Txxx --force to reindex it, with --trace.
    • Before: task indexed in about 30s.
    • After: script loaded comments with LIMIT 1000 and indexed in a couple seconds.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable