Homec4science

Simplify "builtin file" management and recover from races

Authored by epriestley <git@epriestley.com> on Jul 11 2016, 18:16.

Description

Simplify "builtin file" management and recover from races

Summary:
Fixes T11307. Fixes T8124. Currently, builtin files are tracked by using a special transform with an invalid source ID.

Just use a dedicated column instead. The transform thing is too clever/weird/hacky and exposes us to issues with the "file" and "transform" tables getting out of sync (possibly the issue in T11307?) and with race conditions.

Test Plan:

  • Loaded profile "edit picture" page, saw builtins.
  • Deleted all builtin files, put 3 second sleep in the storage engine write, loaded profile page in two windows.
    • Before patch: one of them failed with a race.
    • After patch: both of them loaded.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8124, T11307

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

Details

Committed
epriestley <git@epriestley.com>Jul 11 2016, 18:25
Pushed
aubortJan 31 2017, 17:16
Parents
rPH830f3eb8f803: When users choose a default project icon, make a permanent file
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH8ad61d01502d: Simplify "builtin file" management and recover from races (authored by epriestley <git@epriestley.com>).Jul 11 2016, 18:25