-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use number of partitions as parallilism in region scanner (#4669)
* fix: use number of partitions as parallilism in region scanner Signed-off-by: Ruihang Xia <[email protected]> * add sqlness Signed-off-by: Ruihang Xia <[email protected]> Co-authored-by: Lei HUANG <[email protected]> * order by ts Signed-off-by: Ruihang Xia <[email protected]> * debug pring time range Signed-off-by: Ruihang Xia <[email protected]> --------- Signed-off-by: Ruihang Xia <[email protected]> Co-authored-by: Lei HUANG <[email protected]>
- Loading branch information
Showing
5 changed files
with
186 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
tests/cases/standalone/common/select/flush_append_only.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
create table | ||
t ( | ||
ts timestamp time index, | ||
host string primary key, | ||
not_pk string, | ||
val double, | ||
) | ||
with | ||
( | ||
append_mode = 'true', | ||
'compaction.type' = 'twcs', | ||
'compaction.twcs.max_active_window_files' = '8', | ||
'compaction.twcs.max_inactive_window_files' = '8' | ||
); | ||
|
||
Affected Rows: 0 | ||
|
||
insert into | ||
t | ||
values | ||
(0, 'a', '🌕', 1.0), | ||
(1, 'b', '🌖', 2.0), | ||
(1, 'a', '🌗', 3.0), | ||
(1, 'c', '🌘', 4.0), | ||
(2, 'a', '🌑', 5.0), | ||
(2, 'b', '🌒', 6.0), | ||
(2, 'a', '🌓', 7.0), | ||
(3, 'c', '🌔', 8.0), | ||
(3, 'd', '🌕', 9.0); | ||
|
||
Affected Rows: 9 | ||
|
||
admin flush_table ('t'); | ||
|
||
+------------------------+ | ||
| ADMIN flush_table('t') | | ||
+------------------------+ | ||
| 0 | | ||
+------------------------+ | ||
|
||
insert into | ||
t | ||
values | ||
(10, 'a', '🌕', 1.0), | ||
(11, 'b', '🌖', 2.0), | ||
(11, 'a', '🌗', 3.0), | ||
(11, 'c', '🌘', 4.0), | ||
(12, 'a', '🌑', 5.0), | ||
(12, 'b', '🌒', 6.0), | ||
(12, 'a', '🌓', 7.0), | ||
(13, 'c', '🌔', 8.0), | ||
(13, 'd', '🌕', 9.0); | ||
|
||
Affected Rows: 9 | ||
|
||
admin flush_table ('t'); | ||
|
||
+------------------------+ | ||
| ADMIN flush_table('t') | | ||
+------------------------+ | ||
| 0 | | ||
+------------------------+ | ||
|
||
select | ||
count(ts) | ||
from | ||
t; | ||
|
||
+-------------+ | ||
| COUNT(t.ts) | | ||
+-------------+ | ||
| 18 | | ||
+-------------+ | ||
|
||
select | ||
ts | ||
from | ||
t | ||
order by | ||
ts; | ||
|
||
+-------------------------+ | ||
| ts | | ||
+-------------------------+ | ||
| 1970-01-01T00:00:00 | | ||
| 1970-01-01T00:00:00.001 | | ||
| 1970-01-01T00:00:00.001 | | ||
| 1970-01-01T00:00:00.001 | | ||
| 1970-01-01T00:00:00.002 | | ||
| 1970-01-01T00:00:00.002 | | ||
| 1970-01-01T00:00:00.002 | | ||
| 1970-01-01T00:00:00.003 | | ||
| 1970-01-01T00:00:00.003 | | ||
| 1970-01-01T00:00:00.010 | | ||
| 1970-01-01T00:00:00.011 | | ||
| 1970-01-01T00:00:00.011 | | ||
| 1970-01-01T00:00:00.011 | | ||
| 1970-01-01T00:00:00.012 | | ||
| 1970-01-01T00:00:00.012 | | ||
| 1970-01-01T00:00:00.012 | | ||
| 1970-01-01T00:00:00.013 | | ||
| 1970-01-01T00:00:00.013 | | ||
+-------------------------+ | ||
|
||
drop table t; | ||
|
||
Affected Rows: 0 | ||
|
58 changes: 58 additions & 0 deletions
58
tests/cases/standalone/common/select/flush_append_only.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
create table | ||
t ( | ||
ts timestamp time index, | ||
host string primary key, | ||
not_pk string, | ||
val double, | ||
) | ||
with | ||
( | ||
append_mode = 'true', | ||
'compaction.type' = 'twcs', | ||
'compaction.twcs.max_active_window_files' = '8', | ||
'compaction.twcs.max_inactive_window_files' = '8' | ||
); | ||
|
||
insert into | ||
t | ||
values | ||
(0, 'a', '🌕', 1.0), | ||
(1, 'b', '🌖', 2.0), | ||
(1, 'a', '🌗', 3.0), | ||
(1, 'c', '🌘', 4.0), | ||
(2, 'a', '🌑', 5.0), | ||
(2, 'b', '🌒', 6.0), | ||
(2, 'a', '🌓', 7.0), | ||
(3, 'c', '🌔', 8.0), | ||
(3, 'd', '🌕', 9.0); | ||
|
||
admin flush_table ('t'); | ||
|
||
insert into | ||
t | ||
values | ||
(10, 'a', '🌕', 1.0), | ||
(11, 'b', '🌖', 2.0), | ||
(11, 'a', '🌗', 3.0), | ||
(11, 'c', '🌘', 4.0), | ||
(12, 'a', '🌑', 5.0), | ||
(12, 'b', '🌒', 6.0), | ||
(12, 'a', '🌓', 7.0), | ||
(13, 'c', '🌔', 8.0), | ||
(13, 'd', '🌕', 9.0); | ||
|
||
admin flush_table ('t'); | ||
|
||
select | ||
count(ts) | ||
from | ||
t; | ||
|
||
select | ||
ts | ||
from | ||
t | ||
order by | ||
ts; | ||
|
||
drop table t; |