Open juice411 opened 3 years ago
复现过程:
bm在release 0.11.3上生成数据 bm配置文件: INSERT_MODE=session IS_CLIENT_BIND=true CLIENT_NUMBER=10 GROUP_NUMBER=1 DEVICE_NUMBER=1 SENSOR_NUMBER=6 BATCH_SIZE=1000 LOOP=10000 IS_OVERFLOW=false OPERATION_PROPORTION=1:0:0:0:0:0:0:0:0:0:0
Rel 0.11.3 cli 修改序列增加tags信息 show timeseries; flush alter timeseries root.group_0.d_0.s_2 UPSERT ALIAS=alias_s2 TAGS(tag='hi',tag2='hello') ATTRIBUTES(attr1='red',attr2='blue') // 根据tag信息查询时间序列 结果正确 不报错 show timeseries root.group_0.d_0 where tag2='hello'; show timeseries root.group_0.d_0 where tag='hi';
重启0.11.3 或 copy 0.11.3的data到rel 0.11.4/0.11.4 cli根据tag查询序列报错 show timeseries root.group_0.d_0 where tag2='hello'; Msg: 500: The key tag2 is not a tag. show timeseries可以看到tags信息
复现过程2:
import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors;
public class SessionPoolExample {
private static SessionPool pool; private static ExecutorService service; private static Session session;
public static void main(String[] args) throws StatementExecutionException, IoTDBConnectionException, InterruptedException { pool = new SessionPool("127.0.0.1", 6667, "root", "root", 3); service = Executors.newFixedThreadPool(10);
session = new Session("127.0.0.1", 6667, "root", "root");
session.open(false);
query();
Thread.sleep(1000);
pool.close();
session.close();
service.shutdown();
}
private static void query() throws IoTDBConnectionException, StatementExecutionException { SessionDataSet dataSet; String sql = "ALTER timeseries root.group_0.d_0.s_2 UPSERT ALIAS=alias_test TAGS(tag='test',dir='/data/test',exName='exTest',description='desTest',unit='unitTest') ATTRIBUTES(minValue=1,maxValue=1000)";
pool.executeNonQueryStatement(sql);
dataSet = session.executeQueryStatement("show timeseries where tag='test'");
System.out.println(dataSet.getColumnNames());
dataSet.setFetchSize(1024); // default is 10000
while (dataSet.hasNext()) {
System.out.println(dataSet.next());
}
dataSet.closeOperationHandle();
}
} 编译,运行: javac -cp /data/lz/pr_test/rel_12/distribution/target/apache-iotdb-0.12.1-SNAPSHOT-server-bin/apache-iotdb-0.12.1-SNAPSHOT-server-bin/lib/*:. ./SessionPoolExample.java
java -cp /data/lz/pr_test/rel_12/distribution/target/apache-iotdb-0.12.1-SNAPSHOT-server-bin/apache-iotdb-0.12.1-SNAPSHOT-server-bin/lib/*:. SessionPoolExample 执行结果:
未复现。
1.老版本是11.3,加了测点 2.后面升级到11.5后,在次修改测点(sql=ALTER timeseries {} UPSERT ALIAS={} TAGS(name='{}',dir='{}',exName='{}',description='{}',unit='{}') ATTRIBUTES(minValue={},maxValue={})),sessionPool.executeNonQueryStatement(sql)修改是正常提交了,但完成后根据tag查不到数据 3.实在没有办法就删除了测点 delete timeseries,重新添加测点 4.再次查询,发现可以正常了