Page MenuHomePhabricator

Document the need to restart Phabricator after performing a restore
ClosedPublic

Authored by epriestley on Jul 3 2017, 5:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 17, 2:43 PM
Unknown Object (File)
Thu, Apr 11, 9:54 AM
Unknown Object (File)
Thu, Apr 4, 8:19 PM
Unknown Object (File)
Feb 22 2024, 11:23 AM
Unknown Object (File)
Jan 5 2024, 10:35 PM
Unknown Object (File)
Dec 29 2023, 7:11 PM
Unknown Object (File)
Dec 23 2023, 5:34 PM
Unknown Object (File)
Nov 30 2023, 5:13 AM
Subscribers
None

Details

Summary

Depending on how you perform a restore, APC (or, e.g., running daemon processes) might be poisoned with out-of-date caches.

Add a note to advise installs to restart after restoring data.

See also lengthy fishing expedition support thread.

Test Plan

Read the text.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I guess there's no way to detect that this bad state and warn the user about it explicitly?

This revision is now accepted and ready to land.Jul 3 2017, 5:36 PM

We have some code like this:

$old = ...;
$new = compute_hash($data);
if (!compare($old_hash, $new_hash)) {
 throw no;
}

We could do this:

$old = ...;
$new = compute_hash($data);
if (!equal($old_hash, $new_hash)) {
  dump_the_cache();
  $old = ...;
  $new = compute_hash($data);
  if (!equal($old_hash, $new_hash)) {
    throw no;
  }
}

...but that doesn't feel great, and there are probably 500 other places where we have similar issues.

When we write a file, we have some code like this:

$hmac_key = read_from_cache();
$integrity_hash = compute_hash($data, $hmac_key);

Unlike the read case, we have no way to tell if that key is suspect.

We could just not cache the key, or not cache it on writes, but if we start down that path we probably end up at "no caching because sometimes installs do crazy things" which is probably the wrong result.

I also can't come up with any way to detect that a restore has occurred, since you might only be rolling back a few minutes, not restoring an export / entirely different install.

So none of these approaches feel terribly satisfying, but I don't see a better way to figure this out automatically.

This revision was automatically updated to reflect the committed changes.