Files
gerrit/gerrit-acceptance-framework
Dave Borowitz 3396e57b52 Disable ReindexAfterRefUpdate in tests
This functionality causes a race during tests that may cause flaky
failures. Specifically, in the case of
ChangeIT#abandonAndRestoreAllowedWithPermission:

1. ACL grant on the main thread (A) modifies refs/meta/config, which
   triggers ReindexAfterRefUpdate, which kicks off a background task
   (thread B) to search for and reindex affected changes.
2. B reads change from primary storage, observes that it is open, and
   constructs a document.
3. A abandons the change, saves the result in primary storage.
4. A indexes the change, deleting it from the open index and adding it
   to the closed index.
5. B indexes the document it constructed in (2), adding it to the open
   index.
6. A attempts to look up the change, finds it in both the open and
   closed indexes, and explodes.

Turning off auto-reindexing causes tests to pass.

The race still exists in running servers, although in practice the
inconsistent cases are fleeting and the index should usually end up in a
consistent state. More details and reflections are in the bug.

Bug: Issue 5944
Change-Id: Ifca5a1065852db38a562755b652fad3de3672816
2017-04-17 17:01:49 -04:00
..
2017-04-12 09:44:54 +09:00