influxdata / influxdata/influxdb-java
Fields sometimes null after retrieving QueryResult from InfluxDB
Nessuno ha ancora preso questa issue.
- Lingua principale
- Java
- Stelle
- 1.2k
- Fork
- 469
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Most of the time I'm able to successfully query my InfluxDB and convert the result to POJO without any issue. However, sometimes after getting the QueryResult , some of the property fields, for my object, in the QueryResult are null even though none of the fields are null/empty for that record in my InfluxDB measurement. This only happens to a few of the property fields too, not all of them. Why does this happen?
My Spring Boot application also receives many concurrent requests at any given moment, which makes me think this may be a multi-threading issue. Also my class has a `@Data` Lombok annotation if that is relevant during the POJO conversion. So far, a temporary solution is refetching the QueryResults a second time. During this second time, the fields are no longer null. I included an example below for my Transaction measurement and class/POJO
**Transaction measurement (in InfluxDB)**
Time: 1612283422708733547
Amount: 18.20
Status: Success
**POJO (in Spring Boot application after resultMapper.toPOJO)**
Time: 1612283422708733547
Amount: null
Status: null
Current logic in application
```
Query query = new Query(String.format(queryString, lastTimestamp), "transaction");
QueryResult queryResult = influxDB.query(query);
return resultMapper.toPOJO(queryResult, Transaction.class, TimeUnit.NANOSECONDS);
```
InfluxDB version: 1.8.3
Could this be related to #676 or #693 or #683 ?
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
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.
Direzione di ricerca
Inizia dal percorso Query, QueryResult e resultMapper.toPOJO descritto nell’issue, quindi esamina come vengono gestite le richieste concorrenti. Riproduci la conversione intermittente dei campi null con l’esempio Transaction e InfluxDB 1.8.3; il lavoro è completo quando la causa è stata identificata e i campi valorizzati vengono preservati durante le richieste concorrenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java, spring-boot
- Ambito
- backend, databases
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100