Skip to content

UserServicerModules#4

Merged
gilxgil merged 22 commits into
mainfrom
dev
Mar 22, 2022
Merged

UserServicerModules#4
gilxgil merged 22 commits into
mainfrom
dev

Conversation

@theinterestedr1

Copy link
Copy Markdown
Contributor

No description provided.

@theinterestedr1 theinterestedr1 changed the title Dev UserServicerModules Mar 22, 2022
@gilxgil gilxgil merged commit 0f24d76 into main Mar 22, 2022
@gilxgil gilxgil deleted the dev branch March 24, 2022 02:40
@zeari zeari mentioned this pull request Jul 11, 2022
shleikes pushed a commit that referenced this pull request Dec 1, 2024
NadavLevi added a commit that referenced this pull request Mar 16, 2026
)

- Add apiInterface parameter to ConsumerMetricsManagerInf.SetProviderSelected
- Update NoOpConsumerMetrics, ConsumerMetricsManager, SmartRouterMetricsManager
- Register lava_rpc_endpoint_selection_score with {spec, apiInterface, endpoint_id, score_type}
- Update consumer_session_manager.go call sites to pass rpcEndpoint.ApiInterface
- StartSelectionStatsUpdater uses "" for apiInterface (not available in optimizer reports)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
NadavLevi added a commit that referenced this pull request Mar 16, 2026
Addresses all issues raised in code review (issues #1–9, #11–19):

Correctness:
- Add apiInterface label to endpointSelectionScore gauge and propagate it
  through SetProviderSelected interface and all call sites (#4)
- Align SetRelayNodeErrorMetric parameter order to (chainId, apiInterface,
  providerAddress, method) — was (providerAddress, chainId, apiInterface) (#7)
- Scope metric setters outside the lock in RegisterEndpoint to avoid
  re-entrant RWMutex deadlock (#11)
- Record cache latency histogram only on cache hits, not misses (#12)
- Remove dead field MeasureAfterProviderProcessingTime from RelayMetrics
  and its sole write site (#14)

Dead code:
- Remove dead stubs SetRelaySentToProviderMetric and SetRequestPerProvider
  from SmartRouterMetricsManager (#5)
- Delete empty consumer_metrics_manager_test.go (#18)

Simplification:
- Replace bespoke registerMetric closure with generic registerOrReuse
  helper throughout ConsumerMetricsManager (#6)
- Unify latency histogram buckets via shared LatencyBuckets variable in
  buckets.go — removes per-file duplicates (#8)
- Drop unnecessary goroutine spawns from RPCConsumerLogs metric forwarders;
  callers already run in goroutines where needed (#9)
- Replace RequestProperties struct with *RelayMetrics in RecordDirectRelayEnd,
  eliminating a duplicate of the same fields (#15)

Documentation:
- Document the request-group counting invariants in SetRelayMetrics (#13)
- Add comment explaining why UpdateHealthcheckStatusBreakdown is a no-op
  in SmartRouterMetricsManager (#16)
- Fix struct comment to list all four labels including apiInterface (#17)

Tests:
- Scope gomock.Controller to each subtest in TestIsArchiveRequest,
  TestIsDebugOrTraceRequest, and TestIsBatchRequest (#19)
- Add TestConsumerSetRelayMetrics_PartitionInvariant asserting
  batch+read+write==total and success+failed==total (#13)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
avitenzer added a commit that referenced this pull request Apr 1, 2026
Re-evaluate all 6 shortfalls against current branch state:
- #1 (standalone binary): RESOLVED
- #2 (test suite): RESOLVED
- #3 (lavasession test): pre-existing flaky test, not a regression
- #4 (dependency cleanup): cosmos-sdk removed, cosmossdk.io utilities remain
- #5 (Dockerfile): still has stale ldflags, needs update
- #6 (branch hygiene): team workflow, not code

Added action plan with must-do, should-do, and deferred items.
avitenzer added a commit that referenced this pull request Apr 1, 2026
…ypes/

Mark shortfalls #3 and #4 (cosmossdk.io/errors, cosmossdk.io/math) as
completed. Update action plan with completed items and current
acceptance checklist status.

Remaining open items: Dockerfile update (must-do), flaky lavasession
test (should-do).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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