Possibly misleading warning about HikariDataSource not being refreshable
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 72/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- java, spring, spring-boot
- Ambito
- documentation
Direzione di ricerca
Inizia dalla pagina collegata Spring Cloud Context: Application Context Services e leggi ConfigurationPropertiesRebinder#getNeverRefreshable in spring-cloud-context/src/main/java/org/springframework/cloud/context/properties/ConfigurationPropertiesRebinder.java. Individua il sorgente della pagina, sposta la nota sul DataSource pooled in Environment Changes, rendine più generale la formulazione e verifica la documentazione renderizzata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
There is the following warning on the page Spring Cloud Context: Application Context Services:
If you have a DataSource bean that is a HikariDataSource, it can not be refreshed. It is the default value for spring.cloud.refresh.never-refreshable. Choose a different DataSource implementation if you need it to be refreshed.
This statement may be misleading because it appears in the section describing @RefreshScope. As far as I understand, there is nothing that prevents users from annotating a HikariDataSource bean with @RefreshScope, since the underlying target bean is recreated when the refresh scope is refreshed.
It is probably true that relying on @ConfigurationProperties rebinding for a HikariDataSource is not a good idea. That behavior is explicitly disabled through the spring.cloud.refresh.never-refreshable property, which includes HikariDataSource by default. However, looking at the implementation of ConfigurationPropertiesRebinder#getNeverRefreshable, this property only affects configuration property rebinding and is unrelated to beans managed by @RefreshScope.
I also don't understand why HikariDataSource is singled out here. Pooled DataSource implementations are generally fairly complex objects, and relying on configuration property rebinding alone is probably too simplistic. If that's the concern, it would seem to apply equally to other pooled DataSource implementations (for example, Tomcat JDBC Pool), not just HikariDataSource.
Suggestion
Update the documentation as follows:
- Move the note about
HikariDataSourcefrom the Refresh Scope section to the Environment Changes section. - Generalize the note to explain that relying on configuration property rebinding for pooled
DataSourceimplementations may not be appropriate in general, rather than singling outHikariDataSource.
- Lingua principale
- Java
- Stelle
- 751
- Fork
- 746
- Merge medio
- 16h 35m
- PR unite (30g)
- 23
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la 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 spring-cloud/spring-cloud-commons
-
waiting-for-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
spring-cloud/spring-cloud-commons#1543 ·
I maintainer di solito rispondono entro 1 giorno
-
HealthCheckServiceInstanceListSupplier docs say all instances are returned when none are healthy, but code returns an empty listForse già presa @bhosale-mahesh l’ha presa 3 giorni fa. Apertadocumentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 50/100
spring-cloud/spring-cloud-commons#1771 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
waiting-for-triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 48/100
spring-cloud/spring-cloud-commons#1727 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement for team discussion
Difficoltà 5/5 Più di una settimana Idoneità per principianti 42/100
spring-cloud/spring-cloud-commons#1676 ·
I maintainer di solito rispondono entro 1 giorno
-
waiting-for-triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
spring-cloud/spring-cloud-commons#1675 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di spring-cloud/spring-cloud-commons
Issue simili
-
better night vision compatAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
QuicksilverMC/Argentum#31 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
navikt/mock-oauth2-server#1129 ·
I maintainer di solito rispondono entro 1 giorno
-
bug main ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
openhab/openhab-webui#4600 ·
I maintainer di solito rispondono entro 4 giorni
-
26.4 area: tags enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
`DeepSeekChatModel` streaming returns no content when chunks have no `id`Forse già presa @lejuho l’ha presa oggi. Apertastatus: waiting-for-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
spring-projects/spring-ai#7214 ·
I maintainer di solito rispondono entro 2 giorni