mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-13 08:43:00 +00:00
* feat: adds Requester to process table flush and compaction request * feat: admin_fn macros for administration functions * test: add query result * feat: impl flush_region, flush_table, compact_region, and flush_region functions * docs: add Arguments to admin_fn macro * chore: apply suggestion Co-authored-by: Zhenchi <zhongzc_arch@outlook.com> * chore: apply suggestion Co-authored-by: Zhenchi <zhongzc_arch@outlook.com> * fix: group_requests_by_peer and adds log * Update src/common/macro/src/admin_fn.rs Co-authored-by: Ruihang Xia <waynestxia@gmail.com> * feat: adds todo for spawan thread * feat: rebase with main --------- Co-authored-by: Zhenchi <zhongzc_arch@outlook.com> Co-authored-by: Ruihang Xia <waynestxia@gmail.com>
55 lines
1.1 KiB
Plaintext
55 lines
1.1 KiB
Plaintext
--- test flush_table and compact_table ---
|
|
CREATE TABLE test(ts timestamp time index);
|
|
|
|
Affected Rows: 0
|
|
|
|
INSERT INTO test VALUES (1), (2), (3), (4), (5);
|
|
|
|
Affected Rows: 5
|
|
|
|
SELECT * FROM test;
|
|
|
|
+-------------------------+
|
|
| ts |
|
|
+-------------------------+
|
|
| 1970-01-01T00:00:00.001 |
|
|
| 1970-01-01T00:00:00.002 |
|
|
| 1970-01-01T00:00:00.003 |
|
|
| 1970-01-01T00:00:00.004 |
|
|
| 1970-01-01T00:00:00.005 |
|
|
+-------------------------+
|
|
|
|
SELECT FLUSH_TABLE('test');
|
|
|
|
+---------------------------+
|
|
| flush_table(Utf8("test")) |
|
|
+---------------------------+
|
|
| 0 |
|
|
+---------------------------+
|
|
|
|
SELECT COMPACT_TABLE('test');
|
|
|
|
+-----------------------------+
|
|
| compact_table(Utf8("test")) |
|
|
+-----------------------------+
|
|
| 0 |
|
|
+-----------------------------+
|
|
|
|
--- doesn't change anything ---
|
|
SELECT * FROM test;
|
|
|
|
+-------------------------+
|
|
| ts |
|
|
+-------------------------+
|
|
| 1970-01-01T00:00:00.001 |
|
|
| 1970-01-01T00:00:00.002 |
|
|
| 1970-01-01T00:00:00.003 |
|
|
| 1970-01-01T00:00:00.004 |
|
|
| 1970-01-01T00:00:00.005 |
|
|
+-------------------------+
|
|
|
|
DROP TABLE test;
|
|
|
|
Affected Rows: 0
|
|
|