Repository navigation
Description
Context
This issue implements the roadmap item 'OrphanDetector: Wire to DistributedCoordinator Transaction List' for the sharding domain. It is sourced from the consolidated roadmap under π‘ Medium Priority β Near-term (v1.5.0 β v1.8.0) and targets milestone v1.8.0.
Primary detail section: OrphanDetector: Wire to DistributedCoordinator Transaction List
Goal
Deliver the scoped changes for OrphanDetector: Wire to DistributedCoordinator Transaction List in src/sharding/ and complete the linked detail section in a release-ready state for v1.8.0.
Detailed Scope
OrphanDetector: Wire to DistributedCoordinator Transaction List
Priority: Medium
Target Version: v1.8.0
orphan_detector.cpp lines 50 and 67 have: "TODO: Access coordinator's transactions" and "TODO: Get transaction from coordinator". The orphan detector cannot inspect the coordinator's in-flight transaction list, making orphan detection non-functional.
Implementation Notes:
[ ]InjectDistributedCoordinator*intoOrphanDetectorconstructor; callcoordinator->listInFlightTransactions()at line 50 to get the authoritative transaction list.[ ]At line 67: callcoordinator->getTransaction(txn_id)to fetch transaction metadata.
Priority: High
Target Version: v0.9.0
Complete the RPC integration between shard_rpc_client.cpp / shard_rpc_server.cpp and the mTLS transport layer (mtls_client.cpp, mtls_connection_pool.cpp). Add automatic retry with exponential backoff and circuit-breaker integration (circuit_breaker.cpp) for all cross-shard RPC calls.
Implementation Notes:
- Implement
Shard RpcRetryPolicyinshard_rpc_client.cppusing the existingcircuit_breaker.cppinterface; classify gRPC status codes into retryable (UNAVAILABLE,DEADLINE_EXCEEDED) and non-retryable (INVALID_ARGUMENT,ALREADY_EXISTS). - Wire
mtls_connection_pool.cppintoshard_rpc_client.cppto reuse TLS sessions; max pool size should be configurable viagossip_config_manager.cpp. - Instrument every RPC call via
operational_metrics.cppandprometheus_metrics.cppwith labels forshard_id,method, andoutcome. - Certificate rotation events from
utils/pki_client.cppmust trigger a graceful connection drain inmtls_connection_pool.cppwithout dropping in-flight requests.
Performance Targets:
- Cross-shard RPC P99 latency (LAN): <5 ms excluding consensus overhead.
- Connection pool hit rate: >95% under sustained 10k RPS cross-shard traffic.
- Circuit-breaker open-to-half-open recovery time: configurable, default 5 s.
Acceptance Criteria
- Inject
DistributedCoordinator*intoOrphanDetectorconstructor; callcoordinator->listInFlightTransactions()at line 50 to get the authoritative transaction list. - At line 67: call
coordinator->getTransaction(txn_id)to fetch transaction metadata. - Implement
Shard RpcRetryPolicyinshard_rpc_client.cppusing the existingcircuit_breaker.cppinterface; classify gRPC status codes into retryable (UNAVAILABLE,DEADLINE_EXCEEDED) and non-retryable (INVALID_ARGUMENT,ALREADY_EXISTS). - Wire
mtls_connection_pool.cppintoshard_rpc_client.cppto reuse TLS sessions; max pool size should be configurable viagossip_config_manager.cpp. - Instrument every RPC call via
operational_metrics.cppandprometheus_metrics.cppwith labels forshard_id,method, andoutcome. - Certificate rotation events from
utils/pki_client.cppmust trigger a graceful connection drain inmtls_connection_pool.cppwithout dropping in-flight requests. - Cross-shard RPC P99 latency (LAN): <5 ms excluding consensus overhead.
- Connection pool hit rate: >95% under sustained 10k RPS cross-shard traffic.
- Circuit-breaker open-to-half-open recovery time: configurable, default 5 s.
Relationships
- Roadmap row: P2 - Geo Processor (GDAL Integration)Β #202 (π‘ Medium Priority β Near-term (v1.5.0 β v1.8.0))
- Depends on: none identified during generation.
- Part of: consolidated roadmap delivery tracking.
References
- src/ROADMAP.md
- src/sharding/FUTURE_ENHANCEMENTS.md#orphandetector-wire-to-distributedcoordinator-transaction-list
- Source key: roadmap:202:sharding:v1.8.0:orphandetector-wire-to-distributedcoordinator-transaction-list
Generated from the consolidated source roadmap. Keep the roadmap and issue in sync when scope changes.
Activity