Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Does influxdb-java has limitation for the # of select queries in one query() call?

未关闭
#930 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
java
领域
databases

调研方向

首先使用两个时间范围通过 InfluxDB.query() 重现这五条语句,然后将返回的 QueryResult 与服务器错误和客户端错误(如有)进行比较。检查缺少的结果是否来自 Java 客户端或 InfluxDB 的 multi-statement 处理;完成的标准是确定限制性组件并记录一份可复现的解释。

由索引模型根据 Issue 内容生成。

描述

Environment

java 1.8
SpringBoot 2.4.3
SpringCloud 3.0.5
Influxdb-java 2.20
Influxdb 1.8

Platform

client app: windows 10
influxdb server: centos 7

Question

My influxdb database stores the data from May 2nd to May 5th, and the query string is as below, which contains 5 select:

SELECT metricsA FROM measurementA WHERE time >= '2023-05-02T10:10:30.78+08:00' AND time < '2023-05-20T08:20:30.78+08:00' AND ((uniqId = 'cadd3c08082f07740c459d4366b91002' AND sign=~/.*/) OR (uniqId = 'c0c0250e096735acc6b6dc341b47504a' AND sign=~/1.1|1.2/)) GROUP BY uniqId,sign tz('Etc/GMT-8');
SELECT metricsB FROM measurementB WHERE time >= '2023-05-02T10:10:30.78+08:00' AND time < '2023-05-20T08:20:30.78+08:00' AND ((uniqId = 'cadd3c08082f07740c459d4366b91002' AND sign=~/.*/) OR (uniqId = 'c0c0250e096735acc6b6dc341b47504a' AND sign=~/1.1|1.2/)) GROUP BY uniqId,sign tz('Etc/GMT-8');
SELECT metricsC,metricsD FROM measurementC WHERE time >= '2023-05-02T10:10:30.78+08:00' AND time < '2023-05-20T08:20:30.78+08:00' AND ((uniqId = 'cadd3c08082f07740c459d4366b91002' AND sign=~/.*/) OR (uniqId = 'c0c0250e096735acc6b6dc341b47504a' AND sign=~/1.1|1.2/)) GROUP BY uniqId,sign tz('Etc/GMT-8');
SELECT metricsE FROM measurementD WHERE time >= '2023-05-02T10:10:30.78+08:00' AND time < '2023-05-20T08:20:30.78+08:00' AND ((uniqId = 'cadd3c08082f07740c459d4366b91002') OR (uniqId = 'c0c0250e096735acc6b6dc341b47504a')) GROUP BY uniqId tz('Etc/GMT-8');
SELECT metricsF FROM measurementE WHERE time >= '2023-05-02T10:10:30.78+08:00' AND time < '2023-05-20T08:20:30.78+08:00' AND ((uniqId = 'cadd3c08082f07740c459d4366b91002' AND sign=~/.*/) OR (uniqId = 'c0c0250e096735acc6b6dc341b47504a' AND sign=~/1.1|1.2/)) GROUP BY uniqId,sign tz('Etc/GMT-8');

I'm calling InfluxDB.query() to execute it, but only the first 3 select query returns QueryResult. The Json format of QueryResult is:

"result":[
    {
        "series": [
                    {
                        "name": "measurementA",
                        "tags": {
                            "sign": "1.1",
                            "uniqId": "c0c0250e096735acc6b6dc341b47504a",
                            "IP": "4.4.4.4"
                        },
                        "columns": [
                            "time",
                            "PSUIn"
                        ],
                        "values": [
                            [
                                "2023-05-03T08:04:00+08:00",
                                900.0
                            ],
                            ...
                        ]
                    }
          ]
    },
    {...},
    {...}
]

When I execute each select query seperately, they can all return QueryResults. And there is more, which is when I narrowed down the time range to { 2023-05-02T10:10:30.78+08:00 ---- 2023-05-04T10:10:30.78+08:00 } instead of { 2023-05-02T10:10:30.78+08:00 ---- 2023-05-20T08:20:30.78+08:00 }, it works just fine and gives all the results for 5 queries.

I had no clue why this happened. Is there any constrants for the number of select query in one query() call?

主要语言
Java
星标
1.2k
派生
468
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

influxdata/influxdb-java 的其他 Issue

查看 influxdata/influxdb-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。