Skip to content

IGNITE-28952 [ducktests] Make the cache level topology validator optional in MDC tests - #13431

Open
maksaska wants to merge 3 commits into
apache:masterfrom
maksaska:ignite-28952
Open

IGNITE-28952 [ducktests] Make the cache level topology validator optional in MDC tests#13431
maksaska wants to merge 3 commits into
apache:masterfrom
maksaska:ignite-28952

Conversation

@maksaska

@maksaska maksaska commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

…onal in MDC tests

Thank you for submitting the pull request to the Apache Ignite.

In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:

The Contribution Checklist

  • There is a single JIRA ticket related to the pull request.
  • The web-link to the pull request is attached to the JIRA ticket.
  • The JIRA ticket has the Patch Available state.
  • The pull request body describes changes that have been made.
    The description explains WHAT and WHY was made instead of HOW.
  • The pull request title is treated as the final commit message.
    The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • A reviewer has been mentioned through the JIRA comments
    (see the Maintainers list)
  • The pull request has been checked by the Teamcity Bot and
    the green visa attached to the JIRA ticket (see tab PR Check at TC.Bot - Instance 1 or TC.Bot - Instance 2)

Notes

If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com #ignite channel.

… based topology validation

Generalize the MDC fixture to an arbitrary number of data centers and cover the
majority based MdcTopologyValidator mode an odd DC count selects.

The DC count now picks the validator mode: an even set is validated against a main
datacenter, an odd one against a majority of the set. Passing both is rejected by
MdcTopologyValidator.checkConfiguration(), so mdc_topology_params() emits exactly one
of them, together with the dcsNum the MdcAffinityBackupFilter needs. min_backups()
derives the smallest backup count that gives every DC one copy of every partition,
which is 2 for three DCs.

MdcCluster takes a dcs sequence, verify_split_brain() generalizes into
verify_segments() over an arbitrary segmentation, and cross_dc_network() impairs the
whole cross-DC mesh with per-pair overrides for asymmetric links.

NetworkGroupManager gains enable/disable_network_partitions() for cutting several
links at once. Every chain a node takes part in is installed by the same SSH
round-trip: rolling a multi-way split out link by link would briefly present the
cluster with a different, valid segmentation it would legitimately react to.

The new scenarios assert what two DC mode cannot give: no datacenter is privileged,
so the cluster survives the loss of any single one - including the first, which the
others discovered through - while a three way split leaves no writable segment at
all. Every partition owns one copy per DC, so every segment still serves every read.
…work

The 'pairs' argument let a caller replace the symmetric impairment on individual DC
links. Nothing uses it: all eight call sites want the uniform mesh.

Serving it cost the helper its readability. Reconciling the overrides with the default
took three passes over a frozenset keyed matrix - the frozenset to make (a, b) and
(b, a) the same link, and an is_empty check giving an empty configuration the meaning
"leave this pair unimpaired" rather than "fall back to the default". Two conventions
and a temporary matrix, for a feature with no caller.

Without it the store is filled by one loop over the pairs.

A cluster whose links are not all alike still needs no fixture support: the store is
easy to build by hand and NetworkGroupManager takes it directly, the registry being
the only thing it needs from MdcCluster. That is preferable to a 'store' argument
here, which would have to silently ignore delay_ms/loss whenever it was passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant