Page MenuHomePhabricator

Allow index extensions to skip indexing if the object has not changed
ClosedPublic

Authored by epriestley on Dec 21 2015, 7:18 PM.
Tags
None
Referenced Files
F13998461: D14845.diff
Thu, Oct 24, 9:25 AM
F13981530: D14845.id.diff
Sat, Oct 19, 5:11 PM
F13977470: D14845.diff
Oct 18 2024, 6:41 PM
F13974407: D14845.diff
Oct 18 2024, 5:26 AM
Unknown Object (File)
Aug 31 2024, 9:33 PM
Unknown Object (File)
Aug 30 2024, 11:58 AM
Unknown Object (File)
Aug 28 2024, 5:31 PM
Unknown Object (File)
Aug 23 2024, 5:48 PM
Subscribers
None

Details

Summary

Fixes T9890. This allows IndexExtensions to emit an object version.

Before we build indexes, we check if the indexed version is the same as the current version. If it is, we just don't call that extension.

T9890 has a case where this is useful: a script went crazy and posted thousands of comments to a single task.

Without versioning, that results in the same comments being indexed over and over again. With versioning, most of the queue could just exit without doing any work.

Test Plan
  • Added a sleep(1) to the actual indexing, used bin/search index --background to queue up a lot of tasks, ran them with bin/phd debug task, saw them complete very quickly with only one actual index operation performed.
  • Used bin/search index --trace and bin/search index --trace --background to observe the behavior of queries against the index version store, which looked sensible.
  • Made comments/transactions, saw versions update.
  • Used bin/remove destroy, verified index versions were purged.

Diff Detail

Repository
rP Phabricator
Branch
index8
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 9699
Build 11635: Run Core Tests
Build 11634: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Allow index extensions to skip indexing if the object has not changed.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Dec 21 2015, 8:33 PM
This revision was automatically updated to reflect the committed changes.