Skip to content

add pkg-config dependency to README.md - #3

Merged
yossigo merged 1 commit into
redis:masterfrom
dzrw:patch-1
Aug 21, 2013
Merged

yossigo merged 1 commit into
redis:masterfrom
dzrw:patch-1

Conversation

@dzrw

@dzrw dzrw commented Aug 20, 2013

Copy link
Copy Markdown
Contributor

Otherwise, ./configure fails when the PKG_CHECK_MODULES macro is referenced.

Otherwise, `./configure` fails when the PKG_CHECK_MODULES macro is referenced.
yossigo added a commit that referenced this pull request Aug 21, 2013
add pkg-config dependency to README.md
@yossigo
yossigo merged commit cc49a8b into redis:master Aug 21, 2013
@yossigo

yossigo commented Aug 21, 2013

Copy link
Copy Markdown
Contributor

Thanks!

fcostaoliveira added a commit that referenced this pull request Jun 1, 2026
Add the first slice of the differential test harness proposed in #414: a
pytest module that pins memtier's externally-observable behavior against
redis-benchmark and redis-cli driving the same Redis. Opt-in via
RUN_DIFFERENTIAL=1 so default CI is unaffected; skip-when-missing for
both redis-server, redis-benchmark and redis-cli so runners without
redis-tools never hard-fail.

Five checks from the 10-check matrix are implemented (#4, #5, #6, #7,
#8). Wire-byte equivalence checks (#1, #2, #3) are wired up via a tiny
tests/redis_tap.py userspace proxy + RESP canonicalizer but the
canonical-diff assertions are left as TODOs for the follow-up PR — the
canonicalizer already preserves the expected SETEX vs SET..EX
divergence.

Tolerances are env-tunable (DIFF_OPS_REL_TOL, DIFF_HIT_REL_TOL,
DIFF_LAT_REL_TOL, DIFF_THR_REL_TOL) and documented in the module
docstring with the empirical justification for each default.

Fixes #414 (partial — wire-byte checks remain TODO).

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
fcostaoliveira added a commit that referenced this pull request Jun 7, 2026
…ross-shard read setup_done gate

Round-25 Cursor Bugbot identified two related defects in
cluster_client::get_key_for_conn that turned cross-shard reads into a
silent key-loss / livelock surface.

Bug #2 (cluster_client.cpp:1083 carryover): the
m_strict_no_route_attempts reset for is_read fired unconditionally
after select_target_conn succeeded -- BEFORE the cross-shard
not_available gates below (setup_done at line ~1129 and the
KEY_INDEX_QUEUE_MAX_SIZE cap). When a cross-shard read repeatedly hit
one of those gates the key index was already consumed by
client::get_key_for_conn AND the counter was reset on every attempt,
so hold_pipeline's STRICT_NO_ROUTE_HOLD_THRESHOLD yield never tripped
and fill_pipeline spun. Defer the reset:
  * producer==target fast path: reset inside the
    `if (target_conn_id == conn_id)` branch (unchanged semantics).
  * cross-shard branch: reset only after both not_available gates have
    been passed AND the key has actually been queued. A perpetual
    not_available now accumulates the counter as designed.

Bug #3 (cluster_client.cpp:1129 carryover): the
`if (is_read && get_cluster_slots_state() != setup_done) return
not_available` check at the cross-shard site was the read-side
equivalent of the writes guard round-9 (a257fc2) had to remove.
client::get_key_for_conn already advanced m_obj_gen->m_next_key by
the time this gate executes, so returning not_available silently
consumed the key index -- the iterator wrapped at m_key_max and
re-wrote already-touched keys, the same shortfall round-9 fixed for
writes.

The check existed because "the slot map must be valid to route", but
that readiness is already enforced on the drain side:
shard_connection::fill_pipeline calls is_conn_setup_done() (which
checks m_authentication && m_db_selection && m_cluster_slots &&
m_hello && m_readonly_state all == setup_done) BEFORE draining the
pool. Queueing onto a partially-setup target is therefore safe -- the
queued read is held until the ladder completes. The READONLY ack
concern is gated by m_readonly_state inside is_conn_setup_done(),
not by m_cluster_slots (which is what this check was reading).

The b73b2a9 cross-shard route-then-stage in-flight gate in
hold_pipeline now bounds the producer side, so we cannot unbounded-
push into a stalled target's pool: once (m_reqs_generated -
m_reqs_processed) hits pipeline*connection_count the producer yields
and the queued reads drain when the target completes setup.

Mirrors the existing cross-shard write fix (a257fc2): producer side
does not duplicate the readiness check that the drain side already
enforces. Both fixes leave the same KEY_INDEX_QUEUE_MAX_SIZE
backpressure cap intact.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
fcostaoliveira added a commit that referenced this pull request Jun 8, 2026
The bootstrap-warming gate added in eee6bc9 was scoped to
ratio.a == 0 (GET-only) and held the producer while any replica was
still in setup, so rp_secondary_preferred / rp_nearest wouldn't leak
GETs to the primary during the few-hundred-ms ladder window. Under
mixed workloads (--ratio=1:1) the precondition skipped the gate
entirely, so GETs continued to leak to the primary during warmup --
the exact failure mode test_read_preference_modes.py test #3
guarded against, but only for pure-reads.

Drop the ratio.a==0 precondition from the outer block so the
any_replica_warming hold also fires on mixed traffic. The hold
defers SETs along with GETs for the bootstrap window, which is
acceptable cost for ladder-completion latency.

Keep the ratio.a==0 precondition on the all-replicas-unreachable
warning + stall hold below -- that branch is specifically about the
read-only fill_pipeline spin-loop pathology (no SETs to consume
pipeline budget, so without the yield it would burn CPU). Mixed
workloads have SETs to keep the depth gate happy and cannot spin
here, so the warning is not applicable.

Also document inline (Bugbot round-29 B2) why the gate is not a
permanent hold: even with all replicas dead or DNS broken,
attempt_reconnect() walks through disconnect() -> conn_disconnected
-> backoff window, during which any_replica_warming flips false and
the gate releases (primary fallback works for the permissive modes).
After --max-reconnect-attempts the thread is torn down by
event_base_loopbreak.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
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