Skip to content

[Bug] Failed with query InfluxDb due to error parsing query. #459

@JohnTGZ

Description

@JohnTGZ

Describe the bug

Hi, thanks for the plugin! I have been trying this out in my own application using Zenoh Cpp and have been facing some issues with using the _time argument to define my time range.

Following the Zenoh Time DSL, I define the desired time range using the _time parameters in my Zenoh GET query as follows:

std::string parameters = "_time=[now(-50ms)..now()]";

zenoh::Querier::GetOptions get_options;
get_options.encoding = zenoh::Encoding::Predefined::zenoh_bytes();
auto replies = querier->get(parameters, zenoh::channels::RingChannel(1),
                            std::move(get_options));

However, InfluxDB has error parsing the query and returns the following result:

2025-09-01T15:20:34.801749Z  WARN tokio-runtime-worker ThreadId(02) zenoh_plugin_storage_manager::storages_mgt::service: Storage'<ROUTER_NAME>' raised an error on query: Failed to query InfluxDb with 'SELECT * FROM <KEY> WHERE kind!='DEL' AND time >= now()-0.05s AND time <= now()+0s' : InfluxDB encountered the following error: error parsing query: found s, expected ; at line 1, char 193 at v1/src/lib.rs:633.

Querying via the REST API of the Zenoh router presents no issues:

curl -g 'http://localhost:8000/tf_store/workcell_1?**time=[now(-1000s)..now()]'

I am not sure if this is due to an incorrect parsing of the parameter string to the querier API or a lack of understanding of how the parameters string is being parsed in the InfluxDB plugin. Help would be appreciated!

To reproduce

  1. Construct a GET query as below:
std::string parameters = "_time=[now(-50ms)..now()]";

zenoh::Querier::GetOptions get_options;
get_options.encoding = zenoh::Encoding::Predefined::zenoh_bytes();
auto replies = querier->get(parameters, zenoh::channels::RingChannel(1),
                            std::move(get_options));
  1. Observe logs in Zenoh router

System info

  • Platform: Ubuntu 24.04
  • Zenoh version: zenohd v1.5.0 built with rustc 1.85.0 (4d91de4e4 2025-02-17)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions