Skip to content

fix #115 verify lastTimestamp>retentionSecs for minimal sample - #116

Merged
danni-m merged 1 commit into
masterfrom
big_retention
Jun 2, 2019
Merged

danni-m merged 1 commit into
masterfrom
big_retention

Conversation

@gkorland

@gkorland gkorland commented Jun 2, 2019

Copy link
Copy Markdown
Contributor

No description provided.

@gkorland
gkorland requested a review from danni-m June 2, 2019 15:38
@danni-m
danni-m merged commit 59cd741 into master Jun 2, 2019
@gkorland
gkorland deleted the big_retention branch June 4, 2019 15:19
gabsow added a commit that referenced this pull request Aug 9, 2026
)

deps/LibMR a37b672 -> c6a5ed62, and pass topologyEvents=false at the MR_Init
call site.

Why: the assertion LibMR #116 fixes is still reproducing on the RE8.8 nightly.
Build 100.0.20-7660 (2026-08-05), released TS 80802, shard redis-119:

    21:22:23.033  <timeseries> cluster topology changed        (x5 in 4ms)
    21:22:23.037  <timeseries> Got cluster set command (long form)
    21:22:23.037  === REDIS BUG REPORT START
    21:22:23.037  # ==> /workspace/deps/LibMR/src/mr.c:939 'false' is not true

Long-form CLUSTERSET -> MR_SetClusterData -> MR_ClusterFree() transiently
reports a one-shard topology -> a concurrent execution takes
ExecutionFlag_Local -> its StepType_InternalCommand reaches the worker path
-> assert. #116 holds the Redis lock across the free/rebuild so that state is
never observable. It landed on LibMR master 2026-07-26; 8.8 pinned a37b672,
which predates it, so MOD-16600 could not be verified on that lane at all.

Why bump to master rather than backport: MR_Init is the only LibMR API that
changed between the two pins. Of the 39 MR_* symbols this branch references, 32
are declared in LibMR headers and MR_Init is the single one whose declaration
differs; nothing was removed. So one argument at the call site is the whole
compatibility cost, which is cheaper than a maintenance branch plus a
cherry-pick per fix.

topologyEvents=false is correct here, not merely conservative: redis on this
line never emits the topology-change notification -- the Enterprise cluster
plugin reports "Failed to load symbol: clusterNotifyTopologyChanged, assuming
this an old redis version w/out ASM" -- so those paths are unreachable, and
MR_ClusterInit's entire diff between the pins is
`clusterCtx.topologyEvents = topologyEvents;`, i.e. false reproduces the old
behaviour exactly.

Also arriving with this bump:
- #104 skip the rebuild when CLUSTERSET carries an unchanged topology (MOD-16399)
- #108 fix the execution leak when an initiator execution is aborted
- #111/#115 gate inter-shard TLS on tls-cluster for native-cluster-view paths
  (MOD-16951). Long-form CLUSTERSET keeps the historical tls-port fallback, and
  this branch shows the symptom they fix -- 97 "execution max idle reached" on
  redis-119 in the 7660 package.
- #117/#119 topology-event adjustments, inert with the flag off.

Verified: builds clean for linux-arm64 in rockylinux:9 + gcc-toolset-13 (the
toolchain behind the shipped rhel9-arm64 artifact). Flow suite not run locally
-- leaving that to CI.
gabsow added a commit that referenced this pull request Aug 9, 2026
deps/LibMR a37b672 -> c6a5ed62, pass topologyEvents=false at MR_Init
(src/libmr_integration.c:795), and read INFOCLUSTER's status positionally from
the end instead of index 17.

The mr.c:939 assertion that motivated the 8.8 bump (#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. #116 closes
that by holding the Redis lock across the free/rebuild.

Taking master rather than cherry-picking #116 alone also brings #104
(MOD-16399, skip the rebuild for an unchanged CLUSTERSET), #108 (execution leak
on an aborted initiator execution), #111+#115 (MOD-16951, inter-shard TLS), and
the #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 #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. #115 deletes #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.
gabsow added a commit that referenced this pull request Aug 9, 2026
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 (#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. #116 closes
that by holding the Redis lock across the free/rebuild.

Taking master rather than cherry-picking #116 alone also brings #104
(MOD-16399, skip the rebuild for an unchanged CLUSTERSET), #108 (execution leak
on an aborted initiator execution), #111+#115 (MOD-16951, inter-shard TLS), and
the #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 #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. #115 deletes #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.
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.

2 participants