Change in "mentioned by" edge storage format


#1

When creating a commit, that referenced another commit an “PhabricatorObjectMentionedByObjectEdgeType” edge was created and it had data like this in it’s newValue:

{"PHID-CMIT-pcsq5ddzc2u5kyeblbp6":{"src":"PHID-CMIT-wmksubcggcyo3fncuey3","type":"51","dst":"PHID-CMIT-pcsq5ddzc2u5kyeblbp6","dateCreated":"1460654717","seq":"0","dataID":null,"data":[]},"PHID-CMIT-osvdeb5lla4idxkj6lu6":{"dst":"PHID-CMIT-osvdeb5lla4idxkj6lu6","type":51,"data":[]}}

After upgrading to latest Phabricator version Week 7, Year 2019 same action (mentioning a commit in a commit) creates a transaction, but data in newValue is like this:

["PHID-CMIT-zczboepurkybrnno4cwp"]

Looking at phabricator code the dst sub-key of transactions is still being used.

I wonder:

  1. what is the proper to support edge transactions in both old and new formats
  2. why existing transactions weren’t migrated after format change

Thank you.


#2

See https://secure.phabricator.com/T13051.

  1. what is the proper to support edge transactions in both old and new formats

I don’t understand this question.

  1. why existing transactions weren’t migrated after format change

Because it would take a long time and there’s no reason to do it.

You can migrate manually with bin/garbage compact-edges.


#3

I’m using PhabricatorAuditTransactionQuery class to query all transactions of a commit (both mention edges and audit actions). Since I need both (not only edges) I can’t use PhabricatorEdgeQuery to do so and that’s why I’m parsing newValue of a transaction manually.

Maybe there is a better way, I have no idea.

Good suggestion. I’ll use it.