Repository navigation
MOD-16600 Bump LibMR to master on 8.4 - #2142
Merged
Merged
Conversation
deps/LibMR a37b672 -> c6a5ed62, pass topologyEvents=false at MR_Init (src/libmr_integration.c:796), and read INFOCLUSTER's status positionally from the end instead of index 17. The mr.c:939 assertion that motivated the 8.8 bump (RedisTimeSeries#2139) cannot fire on this line -- there are no MR_ExecutionBuilderInternalCommand call sites here, so no execution contains a StepType_InternalCommand step. What this line does have is the silent half of the same race: MR_ClusterFree sets clusterCtx.clusterSize = 1 while MR_CreateExecution reads it on the main thread, and an execution wrongly flagged ExecutionFlag_Local skips the cross-shard collect, so TS.MRANGE / TS.MGET / TS.QUERYINDEX answer from the local shard with no error. RedisTimeSeries#116 closes that by holding the Redis lock across the free/rebuild. Taking master rather than cherry-picking RedisTimeSeries#116 alone also brings RedisTimeSeries#104 (MOD-16399, skip the rebuild for an unchanged CLUSTERSET), RedisTimeSeries#108 (execution leak on an aborted initiator execution), RedisTimeSeries#111+RedisTimeSeries#115 (MOD-16951, inter-shard TLS), and the RedisTimeSeries#117 INFOCLUSTER fix that removes a live assert here (a37b672 src/cluster.c:1530, RedisModule_Assert(n->slotRanges->len == 1), trippable by a multi-range or slotless master). topologyEvents=false is correct rather than merely conservative: redis on this line never emits the topology-change notification, and MR_ClusterInit's whole diff between the two pins is 'clusterCtx.topologyEvents = topologyEvents;'. MR_TopologyEventSeen has exactly one setter, MR_UpdateClusterTopology(), which no release branch calls, so the gated branches are provably inert. The test change is required by RedisTimeSeries#117, which turns INFOCLUSTER's per-node reply from a fixed 18 elements into 14 + 4*ranges. status is the last element in both layouts, so n[-1] is correct before and after the bump; n[17] silently reads a slot-range value once a node has more than one range and hangs verifyClusterInitialized. Two behaviour changes worth naming in the release notes: - Inter-shard TLS now requires tls-cluster=yes. RedisTimeSeries#115 deletes RedisTimeSeries#111's long-form carve-out, so the tls-port fallback is gone for every topology form. - Short-form CLUSTERSET is now fail-closed: MR_BuildCluster rejects a topology with a duplicate slot claim or coverage != 16384 instead of installing a degraded one. Rejection leaves the shard answering locally until the next successful CLUSTERSET, so watch for 'rejecting topology' in shard logs. Verified: builds clean for linux-arm64 in rockylinux:9 + gcc-toolset-13. Flow suite left to CI.
This was referenced Aug 9, 2026
|
AvivDavid23
approved these changes
Aug 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What
deps/LibMRa37b672→c6a5ed62(master)topologyEvents=falseat theMR_Initcall sitestatusread from the end (n[-1]) instead of index 17, intests/flow/includes.pyandtests/flow/test_ts_libmr_failiure.pySame shape as #2139 (which landed on 8.8), with the test fix that 8.8 still needs as a follow-up.
Why, and why it is not the same reason as 8.8
The
mr.c:939assertion that motivated #2139 cannot fire on this line —git grep -c MR_ExecutionBuilderInternalCommandreturns 0 here versus 6 on 8.8, so no execution contains aStepType_InternalCommandstep.What this line does have is the silent half of the same race:
MR_ClusterFreesetsclusterCtx.clusterSize = 1whileMR_CreateExecutionreads it on the main thread, and an execution wrongly flaggedExecutionFlag_Localskips the cross-shard collect — soTS.MRANGE/TS.MGET/TS.QUERYINDEXanswer from the local shard with no error. #116 closes that by holding the Redis lock across the free/rebuild.Also arriving, and wanted here:
a37b672 src/cluster.c:1530RedisModule_Assert(n->slotRanges->len == 1), trippable by a multi-range or slotless master from the RE extended ASM long formWhy
topologyEvents=falseis correct, not just conservativeRedis on this line never emits the topology-change notification (the Enterprise cluster plugin logs
Failed to load symbol: "clusterNotifyTopologyChanged"). Independently of that,MR_ClusterInit's entire diff between the two pins isclusterCtx.topologyEvents = topologyEvents;, andMR_TopologyEventSeenhas exactly one setter —MR_UpdateClusterTopology()— which no release branch calls. So the gated branches are provably inert andfalsereproducesa37b672's behaviour.Why the test change is required
#117 turns INFOCLUSTER's per-node reply from a fixed 18 elements into
14 + 4*ranges. The order isid, ip, port, unixSocket, runid, [minHslot, maxHslot]×N, pendingMessages, status— sostatusis last in both layouts.n[-1]is therefore correct before and after the bump, whilen[17]silently reads a slot-range value once a node has more than one range, hangingverifyClusterInitializedrather than failing cleanly.Two behaviour changes for the release notes
tls-cluster=yes. TS.RANGE not returning results if Retention bigger than sample time #115 deletes fix #110 verify no empty label key or value are passed #111's long-form carve-out, so thetls-port != 0fallback is gone for every topology form. The changed cell (tls-portset,tls-clusternot yes) goes from TLS to plaintext, and it fails open —checkTLSreturns 0 andAUTH <internal password>is then sent in cleartext. Not reachable in RE steady state (CNM writes both settings together), but reachable during a live internode-encryption enable and permanently for a non-RE consumer with TLS endpoints. No release branch has a TLS test leg.MR_BuildClusterrejects a topology with a duplicate slot claim or coverage!= 16384instead of installing a degraded one. A rejection leaves the shard answering locally until the next successful CLUSTERSET, sorejecting topology/Cluster topology covers %zu of/is claimed by two master nodesin shard logs are worth alerting on.short_form_clustersetis inpack/ramp.ymlon this line andtests/flow/test_asm.pyisenv.skip(), so only real Enterprise exercises it.Verification
linux-arm64inrockylinux:9+gcc-toolset-13— the toolchain behind the shipped rhel9-arm64 artifact.Note
Medium Risk
Touches multi-shard LibMR initialization (cluster reads/writes) and reflects a LibMR bump with TLS/topology behavior changes described in the PR; the diff itself is small but the dependency upgrade carries operational risk.
Overview
LibMR init now passes
topologyEvents=falseas the fourth argument toMR_Initinregister_rg, matching this Redis line where topology-change notifications are unused and keeping behavior aligned with the pre-bump LibMR pin.Cluster flow tests no longer read node
statusat fixed index 17 fromtimeseries.INFOCLUSTER; they usen[-1]so waits stay correct when per-node replies grow with variable slot-range fields (andstatusremains the last element).Reviewed by Cursor Bugbot for commit 0b8d104. Bugbot is set up for automated code reviews on this repo. Configure here.