TDengine icon indicating copy to clipboard operation
TDengine copied to clipboard

java.sql.SQLException: TDengine Error: invalid resultset pointer!

Open sanliang125 opened this issue 6 years ago • 5 comments

Bug 描述 在使用java调用TDEngine java 驱动查询一个表的数据的时候,遇到查询数据稍微多一点就报如下错误的情况。

java.sql.SQLException: TDengine Error: invalid resultset pointer!
at com.taosdata.jdbc.TSDBResultSet.next(TSDBResultSet.java:129)

同时测试了mybatis框架跟JDBC原生测试,都报以上错误。 我的一条数据是6个字段,当查询的数量超过760的时候,就会报以上错误。这个结果是不断缩小查询区间测试出来的。而且这种情况会因为字段数量多少而产生不同报错时机。比如一个表只有一个字段,查询这个表的数据查询到2000多条的时候,才会报以上错误。

情景复现 Steps to reproduce the behavior:

  1. 使用java 1.8
  2. 使用com.taosdata.jdbc.TSDBDriver
  3. 驱动版本
        <dependency>
            <groupId>com.taosdata.jdbc</groupId>
            <artifactId>taos-jdbcdriver</artifactId>
            <version>1.0.3</version>
        </dependency>

4.新建6个以上字段,查询1500条左右,就会报错。

Screenshots 微信图片_20200304095713

Environment (please complete the following information):

  • tdengine service 部署于CentOS 7.0
  • 1G内存, 1核CPU, 30磁盘空间
  • TDengine Version [e.g. 1.6.4.4]
  • 程序运行平台:
  • jdk 1.8,
  • windows 10

sanliang125 avatar Mar 04 '20 02:03 sanliang125

Thank you very much. Please you send the log to me? The steps are as follows: 1. Add” debugflag 135” to / etc / Taos / taos.cfg of the server; 2. Delete all / var / log / Taos; 3. Restart taosd, reproduce the bug, and then send all logs to me. Thank you!

Shawshank-Smile avatar Mar 09 '20 13:03 Shawshank-Smile

I got some log like: " 9 21:54:23.921204 14982 7f942a3fcb80 ERROR DND vid:0, head file:/var/lib/taos/tsdb/vnode0/db/v0f1832**.head is corrupted** 03/09 21:54:23.921215 14982 7f942a3fcb80 ERROR DND vid:0 fileId:1832 is corrupted " That may be caused by the damage of DB file for many possible reasons. So I suggest:Uninstall old tdengine, upgrade software and import data again。Then you can go on..

Shawshank-Smile avatar Mar 09 '20 14:03 Shawshank-Smile

Refer to #1477

johnnyhou327 avatar Apr 11 '20 02:04 johnnyhou327

I got some log like: " 9 21:54:23.921204 14982 7f942a3fcb80 ERROR DND vid:0, head file:/var/lib/taos/tsdb/vnode0/db/v0f1832**.head is corrupted** 03/09 21:54:23.921215 14982 7f942a3fcb80 ERROR DND vid:0 fileId:1832 is corrupted " That may be caused by the damage of DB file for many possible reasons. So I suggest:Uninstall old tdengine, upgrade software and import data again。Then you can go on..

when we use 2.0.4.0 (client and server was same to this version) , remain throw the same exception ! @Shawshank-Smile

huangbotao avatar Nov 06 '20 02:11 huangbotao

把tdengine和taos-jdbcdriver更新到最新版本,这个问题在新版本中不在出现了。我们检查了多线程操作结果集的逻辑,现在可以规避这个问题了。

zyyang90 avatar Mar 22 '21 02:03 zyyang90