Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
picodata
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
picodata
Commits
3d6524bc
Commit
3d6524bc
authored
1 year ago
by
Georgy Moshkin
Browse files
Options
Downloads
Patches
Plain Diff
test: wakeup after ddl (fails due to stale lsn)
parent
e0daa68d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!516
OpDdl create space
Pipeline
#18505
passed
1 year ago
Stage: test
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/int/test_ddl.py
+47
-0
47 additions, 0 deletions
test/int/test_ddl.py
with
47 additions
and
0 deletions
test/int/test_ddl.py
+
47
−
0
View file @
3d6524bc
import
pytest
from
conftest
import
Cluster
...
...
@@ -315,6 +316,52 @@ def test_ddl_create_space_partial_failure(cluster: Cluster):
i3
.
fail_to_start
()
@pytest.mark.xfail
(
reason
=
"
lsn isn
'
t replicated properly
"
)
def
test_successful_wakeup_after_ddl
(
cluster
:
Cluster
):
# Manual replicaset distribution.
# 5 instances are needed for quorum (2 go offline).
i1
=
cluster
.
add_instance
(
replicaset_id
=
"
r1
"
,
wait_online
=
True
)
i2
=
cluster
.
add_instance
(
replicaset_id
=
"
r1
"
,
wait_online
=
True
)
i3
=
cluster
.
add_instance
(
replicaset_id
=
"
r2
"
,
wait_online
=
True
)
i4
=
cluster
.
add_instance
(
replicaset_id
=
"
r2
"
,
wait_online
=
True
)
i5
=
cluster
.
add_instance
(
replicaset_id
=
"
r3
"
,
wait_online
=
True
)
# This is a replicaset follower which will be catching up
i4
.
terminate
()
# This is a replicaset master (sole member) which will be catching up
i5
.
terminate
()
# Propose a space creation which will succeed
space_def
=
dict
(
id
=
666
,
name
=
"
space_name_conflict
"
,
format
=
[
dict
(
name
=
"
id
"
,
type
=
"
unsigned
"
,
is_nullable
=
False
)],
primary_key
=
[
dict
(
field
=
"
id
"
)],
distribution
=
dict
(
kind
=
"
global
"
),
)
index
=
i1
.
ddl_create_space
(
space_def
)
i2
.
call
(
"
.proc_sync_raft
"
,
index
,
(
3
,
0
))
i3
.
call
(
"
.proc_sync_raft
"
,
index
,
(
3
,
0
))
# Space created
assert
i1
.
call
(
"
box.space._space:get
"
,
666
)
is
not
None
assert
i2
.
call
(
"
box.space._space:get
"
,
666
)
is
not
None
assert
i3
.
call
(
"
box.space._space:get
"
,
666
)
is
not
None
# Wake up the catcher-uppers
i4
.
start
()
i5
.
start
()
# FIXME: currently wait_lsn never stops, because lsn doesn't get replicated
# tarantool bug?
i4
.
wait_online
()
i5
.
wait_online
()
# They caught up!
assert
i4
.
call
(
"
box.space._space:get
"
,
666
)
is
not
None
assert
i5
.
call
(
"
box.space._space:get
"
,
666
)
is
not
None
def
test_ddl_from_snapshot
(
cluster
:
Cluster
):
# Second instance is only for quorum
i1
,
i2
=
cluster
.
deploy
(
instance_count
=
2
,
init_replication_factor
=
2
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment