lambdaclass / lambdaclass/lambda_ethereum_consensus

Delay DB size metric until `Db` is started

Open
#1,089 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug good first issue
Dominant language
Elixir
Stars
109
Forks
41
PR merge metrics
No merged PRs in 30d

Description

We have a race condition. If this measurement is called before Db is started, the measurement fails with the message:

Error when calling MFA defined by measurement: 'Elixir.LambdaEthereumConsensus.Telemetry' db_size []
Class=exit
Reason={noproc,{'Elixir.GenServer',call,
                                   ['Elixir.LambdaEthereumConsensus.Store.Db',
                                    get_ref,5000]}}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Elixir.LambdaEthereumConsensus.Telemetry db_size measurement and the Elixir.LambdaEthereumConsensus.Store.Db startup path. Reproduce or inspect the measurement before Db starts, then trace how its get_ref call is handled. Done means the measurement no longer fails when invoked before Db is started.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
backend, observability
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.