Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Fields sometimes null after retrieving QueryResult from InfluxDB

オープン
#733 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
java, spring-boot
領域
backend, databases

調査の方向性

Issue に記載されている Query、QueryResult、resultMapper.toPOJO の経路から始め、次に並行リクエストがどのように処理されるかを調査します。Transaction の例と InfluxDB 1.8.3 を使って、断続的に発生する null フィールドの変換を再現します。原因が特定され、並行リクエスト中も値が設定されたフィールドが保持されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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 ?

主要言語
Java
スター
1.2k
フォーク
468
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

influxdata/influxdb-java のほかの issue

influxdata/influxdb-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。