Page MenuHomePhabricator

Clean up the workflow for some post-push logging code
ClosedPublic

Authored by epriestley on Nov 6 2018, 9:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 21, 1:40 PM
Unknown Object (File)
Fri, Dec 20, 7:44 PM
Unknown Object (File)
Mon, Dec 16, 10:15 AM
Unknown Object (File)
Thu, Dec 12, 2:46 PM
Unknown Object (File)
Thu, Dec 12, 1:34 AM
Unknown Object (File)
Mon, Dec 9, 1:36 AM
Unknown Object (File)
Sun, Dec 1, 3:55 PM
Unknown Object (File)
Nov 20 2024, 9:52 PM
Subscribers
Restricted Owners Package

Details

Summary

Ref T13216. When a repository is clustered, we run this cleanup code (to tell the repository to update, and log some timing information) on both nodes. Currently, we do slightly too much work, which is unnecessary and can be a bit confusing to human readers.

The double update message doesn't hurt anything, but there's no reason to write it twice.

Likewise, the second timing information update query doesn't do anything: there's no PushEvent object with the right identifier, so it just updates nothing. We don't need to run it, and it's confusing that we do.

Instead, only do these writes if we're actually the final node with the repository on it.

Test Plan

Added some logging, saw double writes/updates before the change and no doubles afterwards, with no other behavioral changes.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable