Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
The following works (session API):
String deviceId = "root.sg1.\"org.pragmaticminds:my.device\""; List<String> measurements = new ArrayList<>(); measurements.add("s1"); measurements.add("s2"); measurements.add("s3"); measurements.add("s4"); List<String> values = new ArrayList<>(); values.add("1"); values.add("1.2"); values.add("true"); values.add("dad"); session.insertRecord(deviceId, 1L, measurements, values);
and the rifht TS is implicitly created.
This however fails:
String storageGroup = "root.存储组1"; String[] devices = new String[]{ "设备1.指标1", "设备1.s2", "d2.s1", "d2.指标2", "\"org.pragmaticminds:my.device\".指标2" }; session.setStorageGroup(storageGroup); for (String path : devices) { String fullPath = storageGroup + TsFileConstant.PATH_SEPARATOR + path; session.createTimeseries(fullPath, TSDataType.INT64, TSEncoding.RLE, CompressionType.SNAPPY); }
This is due to the Method `TSServiceImpl.checkPathValidity()` which uses a REGEX that is not in sync with the Parser.
I suggest to remove this method and all checks to it as its simply redundant functionality and we should simply let the parser determine (as single source of truth) what is allowed syntax and what not.
WDYT?
Attachments
Attachments
Issue Links
- links to