summaryrefslogtreecommitdiff
path: root/storage/tokudb/PerconaFT/src/tests/hotindexer-undo-do-tests/README
blob: 184669b99e23484c51fe13eb46a723f55736f594 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
= Hotindexer undo do testing = 

The hotindexer undo do function is tested by feeding it a leafentry,
capturing the actions taken on the hot dictionary,
and comparing the actions with the expected actions.
The test passes if the actions match the expected actions.

Each test is described by a .test file and a .result file.
The .test file describes the set of transactions that are live
when the undo do function is called as well as the transaction records
that comprise a leaf entry.

The .result file describes the actions taken by the undo do function
when processing the leaf entry.

= Contents of a *.test =

Comments begin with '#'.

An <XIDLIST> is a list of transaction id's separated by a SPACE.

<XIDS> is a stack of transaction id's separated by a COMMA.

An <XID> is a 64 bit number.

A <KEY> is a string.

A <VALUE> is a string.

The field separator is a single SPACE.

== set the leaf entry key == 
key <KEY>

== add transaction IDs to the live transaction set ==
live <XIDLIST>

the live transaction set is initially empty

xid <XID> [live|preparing|committing|aborting]

== push a delete transaction record onto the leaf entry stack ==
delete [committed|provisional] <XID>

== push an insert transaction records onto the leaf entry stack ==
insert [committed|provisional] <XID> <VALUE>

== push a placeholder onto the leaf entry stack ==
placeholder <XID>

= Contents of a *.result =

== insert committed ==
insert_committed [<XIDS>] <KEY> <VALUE>
commit_any [<XIDS>] <KEY>

== delete committed ==
delete_committed [<XIDS>] <KEY>
commit_any [<XIDS>] <KEY>

== insert provisional ==
insert_provisional [<XIDS>] <KEY> <VALUE>

== delete provisional ==
delete_provisional [<XIDS>] <KEY>

== lock ==
lock [<XIDS>] <KEY>

= Schema =

Source dictionary: <source key, source data>

Hot dictionary:    <source data, source key>