@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

For backup persitsence, mark the "common ngrams" table as a data table, not an index table

Summary:
Ref T13000. Garbage collecting common ngrams is slow because MySQL isn't all that great at deleting rows quickly. See PHI96, where it looks like it's going to take a week to GC ngrams for a ~million objects at a relatively conservative 0.15 threshold.

In the event of a restore, we can reduce the impact by persisting this table so the ngrams just don't get built when the reindex happens.

Test Plan: Viewed schema in Config, saw common ngrams tables marked as "Data" instead of "Index".

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13000

Differential Revision: https://secure.phabricator.com/D18696

+5 -2
+5 -2
src/applications/config/schema/PhabricatorConfigSchemaSpec.php
··· 81 81 $engine->getNgramsSchemaKeys(), 82 82 $index_options); 83 83 84 + // NOTE: The common ngrams table is not marked as an index table. It is 85 + // tiny and persisting it across a restore saves us a lot of work garbage 86 + // collecting common ngrams from the index after it gets built. 87 + 84 88 $this->buildRawSchema( 85 89 $engine->getApplicationName(), 86 90 $engine->getCommonNgramsTableName(), 87 91 $engine->getCommonNgramsSchemaColumns(), 88 - $engine->getCommonNgramsSchemaKeys(), 89 - $index_options); 92 + $engine->getCommonNgramsSchemaKeys()); 90 93 } 91 94 92 95 protected function buildRawSchema(