Page MenuHomePhabricator

Improve detection of no-op edge edits in ApplicationTransactions
ClosedPublic

Authored by epriestley on Feb 7 2014, 8:18 PM.
Tags
None
Referenced Files
F15663769: D8166.diff
Sat, May 24, 10:11 PM
Unknown Object (File)
Sat, May 10, 10:42 AM
Unknown Object (File)
Thu, May 8, 6:14 PM
Unknown Object (File)
Wed, May 7, 5:17 PM
Unknown Object (File)
Mon, May 5, 6:01 AM
Unknown Object (File)
Apr 21 2025, 8:58 AM
Unknown Object (File)
Apr 15 2025, 10:01 PM
Unknown Object (File)
Apr 15 2025, 8:46 AM
Subscribers

Details

Summary

Ref T4379. When you add a redundant edge, we currently compare the values strictly, using ===. However, the old and new versions of the edge have slightly different member data, because one has been synthetically constructed and one has been read from the database.

Instead, compare only the things we actually care about:

  1. Were any destintations added or removed?
  2. Was any edge data changed?

If the answer to both questions is "no", consider the update a no-op.

Test Plan

In the next diff, I'm making project members use the EDGE transaction type. Before this change, adding an existing project member would generate a transaction with no changes. Now, it is correctly detected as a no-op, while normal transactions continue to work properly.

Diff Detail

Repository
rP Phabricator
Branch
projsub2
Lint
Lint Passed
Unit
No Test Coverage