MaintenancePoolService.assignReward reports a stale balance in its 'exceeds pool balance' error
I maintainer di solito rispondono entro 1 giorno
@urielit1313-creator ci sta già lavorando.
Dal 13/10/2026.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 22/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- typescript
- Ambito
- backend
Direzione di ricerca
Start in MaintenancePoolService.assignReward, at the error thrown when the conditional UPDATE ... WHERE balance >= :amount affects zero rows, and check where pool.balance was read before that update. Fix the message so it does not show a stale balance, either by re-reading the balance or using RETURNING, or by dropping the figure. Two open pull requests (#624 and #650) already target this issue, so compare them before writing a new patch. Done means the error reports a current or omitted balance under concurrent updates, with related issue #274 in mind.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
When the conditional UPDATE … WHERE balance >= :amount affects 0 rows, the error is Requested reward ${amount} exceeds pool balance ${pool.balance}. pool was read before the update, and under concurrency (exactly the case this guard exists for, #274) the balance shown can be higher than the real one. The message then says something like "exceeds pool balance 500" for a 300 reward.
Suggested fix
Re-read the balance (or RETURNING balance) for the message, or omit the figure.
Related: #274
- Lingua principale
- TypeScript
- Stelle
- 2
- Fork
- 90
- Merge medio
- 31m
- PR unite (30g)
- 20
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di MergeFi/backend
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
bug security
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
bug testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
bug security
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di MergeFi/backend
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
zapcooking/frontend#946 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
WiliamRosa/cosmos-semantic-platform#40 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
liberation-data/drivine#733 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
makecindy/cindy#10062 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno