influxdata / influxdata/influxdb-java
Fields sometimes null after retrieving QueryResult from InfluxDB
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Java
- Sterne
- 1.2k
- Forks
- 469
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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 ?
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem im Issue beschriebenen Pfad von Query, QueryResult und resultMapper.toPOJO und untersuche anschließend, wie nebenläufige Anfragen verarbeitet werden. Reproduziere die intermittierende Konvertierung von null-Feldern mit dem Transaction-Beispiel und InfluxDB 1.8.3; abgeschlossen ist die Aufgabe, wenn die Ursache identifiziert ist und befüllte Felder während nebenläufiger Anfragen erhalten bleiben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java, spring-boot
- Bereich
- backend, databases
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 30/100