can't write data into aligned timeseries through MQTT api
- Dominant language
- Java
- Stars
- 6.4k
- Forks
- 1.2k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 115
Description
**Describe the bug**
Failed to write the pre-created aligned timeseries through the MQTT API.But the unaligned timeseries is ok.
**To Reproduce**
Steps to reproduce the behavior:
1. create aligned timeseries root.o308.pd.IT0001(D001 TEXT encoding=PLAIN, D003 FLOAT encoding=GORILLA)
2. Modify the MQTTClient class in the example module of the source code, the code like this:
> String payload =
String.format(
"{\n"
+ "\"device\":\"**root.o308.pd.IT0001**\",\n"
+ "\"timestamp\":%d,\n"
+ "\"measurements\":[\"**D003**\"],\n"
+ "\"values\":[%f]\n"
+ "}",
System.currentTimeMillis(), random.nextDouble());
Thread.sleep(1);
connection.publish("**root.o308.pd.IT0001.D003**", payload.getBytes(), QoS.AT_LEAST_ONCE, false);
4. run the main method,The execution is successful, no error is reported。
5. no data is written.
6. When I change the device in the code to root.o308.pd.IT0002 (a time series that was not pre-created), it can be written normally.And when i pre-created the unaligned timeseries(create timeseries root.sg.d4.s1 FLOAT encoding=RLE),it also written normally.
> IoTDB> select D003 from root.o308.pd.IT0001;
+----+------------------------+
|Time|root.o308.pd.IT0001.D003|
+----+------------------------+
+----+------------------------+
Empty set.
It costs 0.007s
**Expected behavior**
**Screenshots**
**Desktop (please complete the following information):**
- OS: [centos7.8]
- Version [apache-iotdb-0.13.0-SNAPSHOT-all-bin-nightly-2022-03-16-12-12-58-a90f49029-java-8.zip]
**Additional context**
Add any other context about the problem here.
Contributor guide
Research direction
Start with the MQTTClient class in the example module and reproduce the report using the aligned timeseries root.o308.pd.IT0001 and measurement D003. Compare the MQTT write with the working unaligned and newly created cases, then verify with the shown SELECT query that D003 data is stored for the aligned series.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100