Blocking Call on DigestAlgorithm
- Lingua principale
- Java
- Stelle
- 2.6k
- Fork
- 1k
- Merge medio
- 2g 9h
- PR unite (30g)
- 51
Descrizione
### Describe the bug
Hello,
While using BlockHound to detect blocking calls on our service, we found out a blocking call on https://github.com/aws/aws-sdk-java-v2/blob/master/core/checksums/src/main/java/software/amazon/awssdk/checksums/internal/DigestAlgorithm.java#L55 . It seems this is related to a recent change in this class (https://github.com/aws/aws-sdk-java-v2/commit/c137348d67e7cfa2d5f3dcd81e187facfed3e2d8) that introduced a LinkedBlockingDeque.
### Regression Issue
- [ ] Select this option if this issue appears to be a regression.
### Expected Behavior
The Async version of the SDK shouldn't block threads.
### Current Behavior
Due to the internal code of LinkedBlockingDeque, the modified DigestAlgorithm blocks.
### Reproduction Steps
Any HTTP request will trigger this issue, example the Async SDK for DynamoDB (GetItem).
### Possible Solution
Use ConcurrentLinkedDeque or ThreadLocal perhaps.
### Additional Information/Context
_No response_
### AWS Java SDK version used
2.33.11
### JDK version used
21
### Operating System and version
Mac
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia in core/checksums/src/main/java/software/amazon/awssdk/checksums/internal/DigestAlgorithm.java intorno alla riga 55, concentrandoti sulla LinkedBlockingDeque introdotta dal commit c137348d. Riproduci il comportamento con una richiesta asincrona DynamoDB GetItem sotto BlockHound. Il lavoro è completato quando la richiesta asincrona dell'SDK non attiva più una segnalazione di chiamata bloccante in DigestAlgorithm.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- backend
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100