Page MenuHomePhabricator

Deal with Gerrit 3.4 change.mergeabilityComputationBehavior
Closed, ResolvedPublic

Description

Breaking change from Gerrit 3.4

is:mergeable predicate is disabled per default.

Computing is:mergeable has a O(N^2) runtime computation complexity depending on the number of open changes on a branch and on the size of the changes. Hence skip this computation per default to avoid the associated runtime effort.

Most Gerrit installation already disabled this feature and thus wouldn’t need to change anything. Otherwise, to restore the previous behaviour this option: change.mergeabilityComputationBehavior should be changed to API_REF_UPDATED_AND_CHANGE_REINDEX.

The default is NEVER on Gerrit 3.4

3.3 accepts API_REF_UPDATED_AND_CHANGE_REINDEX

Upstream issue https://bugs.chromium.org/p/gerrit/issues/detail?id=14528

Event Timeline

I think we just have to set it explicitly to API_REF_UPDATED_AND_CHANGE_REINDEX in our gerrit.config. The setting is recognized by Gerrit 3.3 so that can be done before the upgrade.

Change 786984 had a related patch set uploaded (by Hashar; author: Hashar):

[operations/puppet@production] gerrit: keep computing changes mergeability

https://gerrit.wikimedia.org/r/786984

Change 786984 merged by JHathaway:

[operations/puppet@production] gerrit: keep computing changes mergeability

https://gerrit.wikimedia.org/r/786984

change.mergeabilityComputationBehavior has been set to API_REF_UPDATED_AND_CHANGE_REINDEX

A note, our Gerrit 3.3 documentation mentions the default is REF_UPDATED_AND_CHANGE_REINDEX but that is an error in the Documentation. The stable-3.3 source code definitely defaults to API_REF_UPDATED_AND_CHANGE_REINDEX