Home » Blog » CnosDB 2.4.0 Release: New Functions Added!

CnosDB 2.4.0 Release: New Functions Added!

CnosDB 2.4.0 has been released and is providing many new functions, function improvement and bugs fixed.

New Aggregate Functions

  • compact_state_agg [#1359 ]
  • gauge_agg [ #1370 ]
  • first [ #1395 ]
  • last [ #1413 ]
  • mode [ #1440 ]
  • increase [ #1476 ]
  • delta [ #1395 ]
  • time_delta [ #1405 ]
  • rate [ #1405 ]

🌐 GIS Functions[ #1465 ]

  • ST_AsBinary
  • ST_GeomFromWKB
  • ST_Distanc
  • ST_Area

💼 Standard Filed Names [ #1461 ]

  • All field names are standardized into lowercase.

Modifying Data

Update TAG

UPDATE table_name SET ( assignment_clause [, ...] ) where_clause
assignment clause :    
    tag_name = value_expression

Update FIELD

UPDATE table_name SET ( assignment_clause [, ...] ) where_clause
assignment clause :    
    field_name = value_expression

ALTER

ALTER TABLE tb_name alter_table_option;
alter_table_option: {      
    ADD TAG col_name    
    | ADD FIELD col_name [CODEC(code_type)]    
    | ALTER col_name SET CODEC(code_type)    
    | DROP col_name    
    | RENAME COLUMN col_name TO new_col_name
}

DELETE

DELETE FROM table_name where_clause

Other Functions

  • Feature : adapt vector. [ #1380 ]
  • Feat: support Geometry data type [ #1463 ]
  • Improve: Add histogram Line Protocol export[ #1472 ]
  • Feat: support state_agg and duration_in for state_agg [ #1423 [ #1408 ]
  • Feat: add support for grpc compression [ #1631 ]
  • cnosdb-imexport: cluster data export/import/migrate tool [ #1635 ]
  • Feat: mark delete and mark modify[ #1510 ]
DROP DATABASE [IF EXISTS] <db_name> [AFTER <time_interval>]

Function Improvements

Memory usage has been effectively reduced, TSKV has been optimized to be more efficient, and FlatBuffers, index building, etc. have also been significantly improved. In addition, detailed optimizations such as cache reconstruction and reduction of cloning operations have taken the overall performance to a higher level.
  • Supports pushing down the <!=> comparison operator to the data source. [  #1469  ]
  • Split WAL by vnode. [  #1454  ]
  • Optimize TSKV to reduce memory usage. [  #1199  ]
  • Refactor DESC TABLES/DESC DATABASES. [  #1397  ]
  • Added resource management function, monitoring of data deletion actions and retry on failure. [  #1616  ]
  • Improved Meta Watch model. [  #1586  ]
  • Refactor iterators and optimize performance. [  #1467  ]
  • Change the big dependency ‘models' to the small dependency ‘error_code'. [  #1470  ]
  • Optimize index building. [  #1468  ]
  • Optimize FlatBuffers. [  #1435  ]
  • Refactor record_file and codec in TSKV. [  #1439  ]
  • Vector type array is mapped into a string. [  #1450  ]
  • Refactor  usage_schema . [  #1479  ]
  • Rename coordinator limiter. [  #1482  ]
  • Add limiter manager. [  #1494  ]
  • Clean up useless code  VnodeStatusListener . [  #1487  ]
  • Reduce cloning operations. [  #1582  ]
  • Fixed the bug that the number of scalar function parameters was not checked. [  #1597  ]
  • Find position before index read. [  #1618  ]
  • Extend the Raft write interface. [  #1620  ]
  • Reconstruct the cache. [  #1560  ]
  • When you delete a table, related data will be deleted. [  #1553  ]
  • Disable   restrictions on tenant cnosdb . [  #1617  ]
  • Leader replication, multiple Raft replication groups. [  #1534  ]
  • Add test cases for functions, DDL, DML. [  #1588  ]
  • Refactor the way data is scanned in tag plans. [  #1634  ]

Bugs Fixed

  • Fix check_writes bug. [#1383]
  • Fix line protocol parser ‘\n' error. [  #1426  ]
  • Modify test cases for reusability. [  #1451  ]
  • Fixed HTTP metric field order error. [  #1506  ]
  • Fix issue where TSM is corrupted but query does not attempt to read. [  #1453  ]
  • Fixed an issue where flow plans were not performing filtered push. [  #1515  ]
  • Fix CLI array out-of-bounds access. [  #1531  ]
  • Fixed data loss issue on restart. [  #1471  ]
  • Drop the database in Raft replication mode. [  #1556  ]
  • Fixed accidental deletion of WAL test directory. [  #1558  ]
  • Fixed password verification failure issue. [  #1583  ]
  • Fixed  time_window  function not being able to handle constant conversion expressions. [  #1578  ]
  • Fixed bucket fill rate. [  #1563  ]
  • Fix confusing error messages. [  #1595  ]
  • Fixed issue with recovering invalid data on reboot. [  #1570  ]
  • It is forbidden to delete the root user. [  #1598  ]
  • Fixed an issue where deleting columns in TSKV resulted in getting an empty database. [  #1581  ]
  • Fixed an issue where changes to /cluster/users/user were not notified to the server. [  #1599  ]
  • Fix the problem of Meta creating duplicate data versions. [  #1605  ]
  • Added scalar function parameter checking. [  #1615  ]
  • Fixed the problem of creating system database  usage_schema  . [  #1606  ]
  • Fixed bug where members were not deleted when deleting a tenant. [  #1626  ]
  • Fixed an issue where TSKV iterators sometimes returned more than expected data. [  #1638  ]
  • Make TSKV node restart not affected by resource hiding. [  #1636  ]
  • Stop the background data file compaction task when performing deletion. [  #1643  ]

Related links :

GitHub Release Notes: https://github.com/cnosdb/cnosdb/releases/tag/v2.4.0