| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Extends the existing TiDB orphan-COM_STMT_EXECUTE sample with an
HTTP endpoint that exercises Apache Pulsar's RoundRobinPartition
routing — the producer-side behaviour that triggers keploy's
partition-suffix replay mismatch (keploy/enterprise#2064).
The bean shape, JDBC parameters and JPA settings replicate the
Flipkart Global-Shipment-Master service's production config so a
recording captured against this sample produces mocks structurally
identical to the customer's:
* HikariCP autoCommit=false paired with
spring.jpa.properties.hibernate.connection.provider_disables_autocommit=true
* JDBC URL: useServerPrepStmts=true&cachePrepStmts=true
&prepStmtCacheSize=500&prepStmtCacheSqlLimit=2048
* Hibernate MySQLDialect (TiDB is wire-compatible on :4000),
open-in-view=false
* Pulsar producer with MessageRoutingMode.RoundRobinPartition
against an 8-partition topic pre-created by the
docker-compose pulsar-init container
New endpoint: POST /events/patch — JPA-saves an Event row through
TiDB then synchronously publishes the payload to the partitioned
topic; mirrors the Flipkart endpoint shape exactly so the customer's
mocks.yaml can be replayed against this sample.
Existing /api/kv/* endpoints (orphan-EXECUTE scenario) are unchanged.
Additions:
* EventEntity / EventRepository: JPA persistence, Hibernate
auto-DDL creates the `events` table.
* PulsarConfig: PulsarClient + Producer<byte[]> beans.
* EventsController: @transactional POST /events/patch.
* docker-compose: Apache Pulsar 4.0.3 standalone + one-shot
pulsar-init that creates the partitioned topic.
* Dockerfile: two-stage Maven -> JRE 17 build.
* k8s/ manifests: namespace, TiDB Deployment+Service, Pulsar
Deployment+Service+Job, app Deployment+Service with
keploy.io/record-session=true for the static webhook.
* README: walkthroughs for the local docker-compose smoke path
and the in-cluster k8s-proxy auto-replay path.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The original sample documentation and inline comments named the internal service, recording, message broker tenant, and entity-id format the regression was first reported against. None of those identifiers are needed to explain the bug — the failure mode is a generic property of RoundRobinPartition routing across record/replay sessions. Replace them with neutral phrasing. Behavioural changes: none. Only docs, comments, and the example curl payloads are touched. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
Summary
What's new
Why RoundRobinPartition specifically
Pulsar's Java client default routing picks a random starting partition per producer instance. Across record/replay sessions the same producer publishing the same payload routes to a different partition number, so a recording captured on …events-partition-N cannot serve a live SEND to …events-partition-M. This is the smallest reliable repro — pinning routing (SinglePartition + fixed key) would mask the bug.
Test plan
🤖 Generated with Claude Code