Debian Codegraph @

test/command/suite/wal_recover/ii/recovering_broken.test

raw
1 # _database_close/_database_reopen can't use with HTTP because requests via HTTP are always
2 # processed by workers. Workers never use primary WAL role.
3 #@require-interface stdio
4
5 #@require-feature message_pack
6
7 #$GROONGA_ALLOW_DATABASE_REOPEN=yes
8 #$GRN_ENABLE_REFERENCE_COUNT=no
9 #$GRN_WAL_ROLE=primary
10
11 #@disable-logging
12 cache_limit --max 0
13 #@enable-logging
14
15 table_create Memos TABLE_NO_KEY
16 column_create Memos content COLUMN_SCALAR Text
17
18 table_create Terms TABLE_PAT_KEY ShortText \
19 --default_tokenizer TokenNgram \
20 --normalizer NormalizerNFKC130
21 column_create Terms memos_content COLUMN_INDEX|WITH_POSITION Memos content
22 column_create Terms #recovering#memos_content \
23 COLUMN_INDEX|WITH_POSITION Memos content
24
25 load --table Memos
26 [
27 {"content": "hello world"},
28 {"content": "good-by world"}
29 ]
30
31 select Memos --query content:@hello
32
33 io_flush
34
35 _database_close
36
37 # Break Terms.#recovering#memos_content
38 #@copy-path #{db_path}.0000104.c #{db_path}.0000104
39
40 #@add-important-log-levels notice
41 _database_reopen
42 #@remove-important-log-levels notice
43
44 select Memos --query content:@hello
45
46 dump
47
48 column_remove Memos content
49
50 dump