Closed evenyag closed 1 week ago
Recent updates introduce new functions and enums for handling diverse table creation types within the Instance
struct in grpc.rs
. These changes focus on enhancing row insert handling and table creation with options such as LastNonNull
. Key modifications include renaming functions, adding new methods to support specific table types, and updating integration tests to validate new behavior.
File(s) | Change Summary |
---|---|
src/.../grpc.rs |
Added handle_influx_row_inserts to Instance struct, handling row inserts and delegating last non-null inserts to self.inserter . |
src/.../influxdb.rs |
Renamed handle_row_inserts to handle_influx_row_inserts in InfluxdbLineProtocolHandler for Instance . |
src/operator/src/insert.rs |
Introduced MERGE_MODE_KEY , APPEND_MODE_KEY ; new enum AutoCreateTableType ; added functions to handle different table creation types and refactored existing ones. |
src/store-api/src/mito_engine_options.rs |
Added public constants APPEND_MODE_KEY and MERGE_MODE_KEY and updated string literals in is_mito_engine_option_key . |
tests-integration/src/influxdb.rs |
Enhanced test scenarios to include CPU data for host2 , updated queries, and validated new output. |
sequenceDiagram
participant Client
participant Instance
participant Inserter
participant TableCreator
Client->>Instance: handle_influx_row_inserts(requests, ctx)
Instance->>Inserter: handle row inserts
Inserter->>TableCreator: create_or_alter_table_with_type(LastNonNull)
TableCreator-->>Inserter: Table creation result
Inserter-->>Instance: Row Insert result
Instance-->>Client: Output Result
In lines of code and bytes of lore,
New tables spring, like fields in yore.
Insert requests now find their way,
Through functions built to save the day.
A rabbit's cheer for changes bright,
New enums, keys, and code so right.
🐰✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@coderabbitai summary
Attention: Patch coverage is 97.22222%
with 2 lines
in your changes missing coverage. Please review.
Project coverage is 84.89%. Comparing base (
4f0984c
) to head (5476a1e
). Report is 7 commits behind head on main.
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
This PR sets the
merge_mode
tolast_non_null
for tables created automatically by the influx protocol handler. Now tables created by the influx handler have the same merge mode asmeasurements
in InfluxDB.Checklist
Summary by CodeRabbit
New Features
LastNonNull
.Bug Fixes
Refactor
Tests