apache / apache/iotdb

[Bug] Querying both the Time field and the t1 field triggers a crash bug.

Open
#13,728 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6.4k
Forks
1.2k
Avg merge
1d 23h
Merged PRs (30d)
115

Description

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/iotdb/issues) and found nothing similar.

### Version

1.3.2

### Describe the bug and provide the minimal reproduce step

```
DROP DATABASE root.db0
CREATE DATABASE root.db0

INSERT INTO root.db0(timestamp,t1) VALUES(1724497540136, true)

# query 1 success
SELECT time FROM root.db0
SELECT t1 FROM root.db0

# query 2 error
SELECT time, t1 FROM root.db0
```

### What did you expect to see?

Query 1.1 returns "No Results," while Query 1.2 can retrieve all the data. Query 2 should correctly return all the data.

### What did you see instead?

Query 2 reports the following error:
```
4668710 [main] WARN o.a.t.transport.TIOStreamTransport - Error closing output stream.
java.net.SocketException: Socket closed
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:118)
at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at java.io.FilterOutputStream.close(FilterOutputStream.java:158)
at org.apache.thrift.transport.TIOStreamTransport.close(TIOStreamTransport.java:156)
at org.apache.thrift.transport.TSocket.close(TSocket.java:252)
at org.apache.iotdb.rpc.TElasticFramedTransport.close(TElasticFramedTransport.java:106)
at org.apache.iotdb.jdbc.IoTDBConnection.reconnect(IoTDBConnection.java:545)
at org.apache.iotdb.jdbc.IoTDBStatement.reConnect(IoTDBStatement.java:705)
at org.apache.iotdb.jdbc.IoTDBStatement.requestStmtId(IoTDBStatement.java:690)
at org.apache.iotdb.jdbc.IoTDBStatement.(IoTDBStatement.java:93)
at org.apache.iotdb.jdbc.IoTDBStatement.(IoTDBStatement.java:127)
at org.apache.iotdb.jdbc.IoTDBConnection.createStatement(IoTDBConnection.java:202)
at org.apache.iotdb.cli.AbstractCli.executeQuery(AbstractCli.java:549)
at org.apache.iotdb.cli.AbstractCli.handleInputCmd(AbstractCli.java:435)
at org.apache.iotdb.cli.AbstractCli.processCommand(AbstractCli.java:811)
at org.apache.iotdb.cli.Cli.readerReadLine(Cli.java:216)
at org.apache.iotdb.cli.Cli.receiveCommands(Cli.java:199)
at org.apache.iotdb.cli.Cli.serve(Cli.java:163)
at org.apache.iotdb.cli.Cli.runCli(Cli.java:101)
at org.apache.iotdb.cli.Cli.main(Cli.java:60)
Msg: java.sql.SQLException: org.apache.thrift.transport.TTransportException: Socket is closed by peer.
```

### Anything else?

Dear IoTDB team, I believe this should be classified as a crash bug. If it is a bug, please mark this issue as "bug". Thank you!

### Are you willing to submit a PR?

- [x] I'm willing to submit a PR!

Contributor guide

Open the contributing guide

Research direction

Reproduce the three queries against IoTDB 1.3.2, then begin with the CLI and JDBC entry points shown in the trace, including AbstractCli.executeQuery and IoTDBConnection.reconnect. Trace the combined time-and-t1 query and verify that it returns the inserted data without closing the connection or raising the reported transport error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
cli, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.