Debian Codegraph @

test/command/suite/tables/array/gc/collect_garbage_by_cursor.test

raw
1 table_create array TABLE_NO_KEY
2 column_create array index COLUMN_SCALAR UInt32
3
4 # GRN_ARRAY_GARBAGES_BUFFER_SIZE + 1 (array_header::garbages) is 6
5 load --table array
6 [
7 {"index": 1},
8 {"index": 2},
9 {"index": 3},
10 {"index": 4},
11 {"index": 5},
12 {"index": 6},
13 {"index": 7},
14 {"index": 8},
15 {"index": 9},
16 {"index": 10}
17 ]
18 delete array --filter true
19
20 load --table array
21 [
22 {"index": 11},
23 {"index": 12},
24 {"index": 13},
25 {"index": 14},
26 {"index": 15},
27 {"index": 16},
28 {"index": 17},
29 {"index": 18},
30 {"index": 19},
31 {"index": 20}
32 ]
33 # This select collects garbage
34 select array
35
36 load --table array
37 [
38 {"index": 21},
39 {"index": 22},
40 {"index": 23},
41 {"index": 24},
42 {"index": 25},
43 {"index": 26},
44 {"index": 27},
45 {"index": 28},
46 {"index": 29},
47 {"index": 30}
48 ]
49 select array --limit -1