forked from orioledb/orioledb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheckpoint_split2_test.py
135 lines (118 loc) · 4.85 KB
/
checkpoint_split2_test.py
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#!/usr/bin/env python3
# coding: utf-8
from .checkpoint_split_base_test import CheckpointSplitBaseTest
class CheckpointSplit2Test(CheckpointSplitBaseTest):
def test_checkpoint_concurrent_right_leaf_split_chkp(self):
self.checkpoint_concurrent_split_base(
"SELECT to_char(id, 'fm0000') || repeat('x', 2500) FROM generate_series(10,18,1) id;",
'downwards', '0015', 1, "SELECT '0019' || repeat('x', 2500)", 10)
def test_checkpoint_concurrent_right_leaf_split(self):
self.checkpoint_concurrent_split_base(
"SELECT to_char(id, 'fm0000') || repeat('x', 2500) FROM generate_series(10,18,1) id;",
'downwards',
'0012',
1,
"SELECT '0019' || repeat('x', 2500)",
10,
with_second_checkpoint=False)
def test_checkpoint_concurrent_right_node_split_chkp(self):
self.checkpoint_concurrent_split_base(
"SELECT to_char(id, 'fm0000') || repeat('x', 2500) FROM generate_series(52,78,1) id;",
'downwards', '0075', 1, "SELECT '0079' || repeat('x', 2500)", 28)
def test_checkpoint_concurrent_right_node_split(self):
self.checkpoint_concurrent_split_base(
"SELECT to_char(id, 'fm0000') || repeat('x', 2500) FROM generate_series(52,78,1) id;",
'downwards',
'0075',
1,
"SELECT '0079' || repeat('x', 2500)",
28,
with_second_checkpoint=False)
def test_checkpoint_concurrent_right_leaf_split_evict_chkp(self):
self.checkpoint_concurrent_split_base(
"SELECT to_char(id, 'fm0000') || repeat('x', 2500) FROM generate_series(10,18,1) id;",
'downwards', '0012', 1, "SELECT '0019' || repeat('x', 2500)", 10,
True)
def test_checkpoint_concurrent_right_leaf_split_evict(self):
self.checkpoint_concurrent_split_base(
"SELECT to_char(id, 'fm0000') || repeat('x', 2500) FROM generate_series(10,18,1) id;",
'downwards',
'0012',
1,
"SELECT '0019' || repeat('x', 2500)",
10,
True,
with_second_checkpoint=False)
def test_checkpoint_concurrent_right_node_split_evict_chkp(self):
self.checkpoint_concurrent_split_base(
"SELECT to_char(id, 'fm0000') || repeat('x', 2500) FROM generate_series(52,78,1) id;",
'downwards', '0075', 1, "SELECT '0079' || repeat('x', 2500)", 28,
True)
def test_checkpoint_concurrent_right_node_split_evict(self):
self.checkpoint_concurrent_split_base(
"SELECT to_char(id, 'fm0000') || repeat('x', 2500) FROM generate_series(52,78,1) id;",
'downwards',
'0075',
1,
"SELECT '0079' || repeat('x', 2500)",
28,
True,
with_second_checkpoint=False)
def test_checkpoint_concurrent_load_node_split_evict_chkp(self):
self.checkpoint_concurrent_split_base(
"SELECT to_char(id, 'fm0000') || repeat('x', 2500) FROM generate_series(500, 330, -10) id;",
'downwards', None, 1,
"SELECT to_char(id, 'fm0000') || repeat('y', 2500) FROM generate_series(319, 370, 1) id;",
70, True, True)
def test_checkpoint_concurrent_node_split_evict_load(self):
self.checkpoint_concurrent_split_base(
"SELECT to_char(id, 'fm0000') || repeat('x', 2500) FROM generate_series(500, 330, -10) id;",
'downwards',
None,
1,
"SELECT to_char(id, 'fm0000') || repeat('y', 2500) FROM generate_series(319, 370, 1) id;",
70,
True,
True,
with_second_checkpoint=False)
def test_checkpoint_concurrent_node_split_var2_evict_load_chkp(self):
self.checkpoint_concurrent_split_base(
"SELECT to_char(id, 'fm0000') || repeat('x', 2500) FROM generate_series(500, 330, -10) id;",
'upwards', None, 0,
"SELECT to_char(id, 'fm0000') || repeat('y', 2500) FROM generate_series(319, 370, 1) id;",
70, True, True)
def test_checkpoint_concurrent_node_split_var2_evict_load(self):
self.checkpoint_concurrent_split_base(
"SELECT to_char(id, 'fm0000') || repeat('x', 2500) FROM generate_series(500, 330, -10) id;",
'upwards',
None,
0,
"SELECT to_char(id, 'fm0000') || repeat('y', 2500) FROM generate_series(319, 370, 1) id;",
70,
True,
True,
with_second_checkpoint=False)
def test_checkpoint_concurrent_node_split_var3_evict_load(self):
self.checkpoint_concurrent_split_base(
"SELECT to_char(id, 'fm0000') || repeat('x', 2500) FROM generate_series(36,45,1) id;",
'downwards',
None,
1,
"SELECT to_char(id, 'fm0000') || repeat('x', 2500) FROM generate_series(11,35,1) id;",
35,
True,
True,
False,
with_second_checkpoint=False)
def test_checkpoint_concurrent_node_split_var3_evict_load_evict(self):
self.checkpoint_concurrent_split_base(
"SELECT to_char(id, 'fm0000') || repeat('x', 2500) FROM generate_series(36,45,1) id;",
'downwards',
None,
1,
"SELECT to_char(id, 'fm0000') || repeat('x', 2500) FROM generate_series(11,35,1) id;",
35,
True,
True,
True,
with_second_checkpoint=False)