mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-08 06:12:55 +00:00
fix: throw errors instead of ignoring (#5792)
* fix: throw errors instead of ignoring * fix: fix unit tests * refactor: remove schema version check * fix: fix clippy * chore: remove unused error * refactor: remove schema version check * feat: handle mutliple results * feat: introduce consistency guard * fix: release consistency guard on datanode operation completion * test: add tests * chore: remove schema version * refactor: rename * test: add more tests * chore: print all error * tests: query table after alteration * log ignored request * refine fuzz test * chore: fix clippy and log mailbox message * chore: close prepared statement after execution * chore: add comment * chore: remove log * chore: rename to `ConsistencyPoison` * chore: remove unused error * fix: fix unit tests * chore: apply suggestions from CR
This commit is contained in:
@@ -192,3 +192,46 @@ DROP TABLE phy;
|
||||
|
||||
Affected Rows: 0
|
||||
|
||||
CREATE TABLE grpc_latencies (
|
||||
ts TIMESTAMP TIME INDEX,
|
||||
host STRING,
|
||||
method_name STRING,
|
||||
latency DOUBLE,
|
||||
PRIMARY KEY (host, method_name)
|
||||
) with('append_mode'='true');
|
||||
|
||||
Affected Rows: 0
|
||||
|
||||
INSERT INTO grpc_latencies (ts, host, method_name, latency) VALUES
|
||||
('2024-07-11 20:00:06', 'host1', 'GetUser', 103.0);
|
||||
|
||||
Affected Rows: 1
|
||||
|
||||
SELECT * FROM grpc_latencies;
|
||||
|
||||
+---------------------+-------+-------------+---------+
|
||||
| ts | host | method_name | latency |
|
||||
+---------------------+-------+-------------+---------+
|
||||
| 2024-07-11T20:00:06 | host1 | GetUser | 103.0 |
|
||||
+---------------------+-------+-------------+---------+
|
||||
|
||||
ALTER TABLE grpc_latencies SET ttl = '10d';
|
||||
|
||||
Affected Rows: 0
|
||||
|
||||
ALTER TABLE grpc_latencies ADD COLUMN home INTEGER FIRST;
|
||||
|
||||
Affected Rows: 0
|
||||
|
||||
SELECT * FROM grpc_latencies;
|
||||
|
||||
+------+---------------------+-------+-------------+---------+
|
||||
| home | ts | host | method_name | latency |
|
||||
+------+---------------------+-------+-------------+---------+
|
||||
| | 2024-07-11T20:00:06 | host1 | GetUser | 103.0 |
|
||||
+------+---------------------+-------+-------------+---------+
|
||||
|
||||
DROP TABLE grpc_latencies;
|
||||
|
||||
Affected Rows: 0
|
||||
|
||||
|
||||
@@ -95,3 +95,24 @@ DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
|
||||
DROP TABLE phy;
|
||||
|
||||
CREATE TABLE grpc_latencies (
|
||||
ts TIMESTAMP TIME INDEX,
|
||||
host STRING,
|
||||
method_name STRING,
|
||||
latency DOUBLE,
|
||||
PRIMARY KEY (host, method_name)
|
||||
) with('append_mode'='true');
|
||||
|
||||
INSERT INTO grpc_latencies (ts, host, method_name, latency) VALUES
|
||||
('2024-07-11 20:00:06', 'host1', 'GetUser', 103.0);
|
||||
|
||||
SELECT * FROM grpc_latencies;
|
||||
|
||||
ALTER TABLE grpc_latencies SET ttl = '10d';
|
||||
|
||||
ALTER TABLE grpc_latencies ADD COLUMN home INTEGER FIRST;
|
||||
|
||||
SELECT * FROM grpc_latencies;
|
||||
|
||||
DROP TABLE grpc_latencies;
|
||||
Reference in New Issue
Block a user