Skip to content

Commit 2667ead

Browse files
committed
3.0 configuration: update master-master sample
1 parent cdf8e02 commit 2667ead

File tree

3 files changed

+27
-7
lines changed

3 files changed

+27
-7
lines changed

doc/code_snippets/snippets/replication/instances.enabled/master_master/config.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ groups:
2626
mode: rw
2727
iproto:
2828
listen: 127.0.0.1:3302
29-
instance003:
30-
database:
31-
mode: rw
32-
iproto:
33-
listen: 127.0.0.1:3303
29+
30+
# Load sample data
31+
app:
32+
file: 'myapp.lua'
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
instance001:
2-
instance002:
3-
instance003:
2+
instance002:
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
function create_space()
2+
box.schema.space.create('bands')
3+
box.space.bands:format({
4+
{ name = 'id', type = 'unsigned' },
5+
{ name = 'band_name', type = 'string' },
6+
{ name = 'year', type = 'unsigned' }
7+
})
8+
box.space.bands:create_index('primary', { parts = { 'id' } })
9+
end
10+
11+
function load_data()
12+
box.space.bands:insert { 1, 'Roxette', 1986 }
13+
box.space.bands:insert { 2, 'Scorpions', 1965 }
14+
box.space.bands:insert { 3, 'Ace of Base', 1987 }
15+
box.space.bands:insert { 4, 'The Beatles', 1960 }
16+
box.space.bands:insert { 5, 'Pink Floyd', 1965 }
17+
box.space.bands:insert { 6, 'The Rolling Stones', 1962 }
18+
box.space.bands:insert { 7, 'The Doors', 1965 }
19+
box.space.bands:insert { 8, 'Nirvana', 1987 }
20+
box.space.bands:insert { 9, 'Led Zeppelin', 1968 }
21+
box.space.bands:insert { 10, 'Queen', 1970 }
22+
end

0 commit comments

Comments
 (0)