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
62d19fbf
Commit
62d19fbf
authored
6 months ago
by
Georgy Moshkin
Browse files
Options
Downloads
Patches
Plain Diff
test: add a failing test for bucket rebalancing before instance expel
parent
f6b5d6c6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1259
Gmoshkin/fix expel
Pipeline
#50122
failed
6 months ago
Stage: test
Stage: docker
Stage: stress-test
Stage: front-deploy
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/int/test_sharding.py
+42
-0
42 additions, 0 deletions
test/int/test_sharding.py
with
42 additions
and
0 deletions
test/int/test_sharding.py
+
42
−
0
View file @
62d19fbf
...
@@ -294,3 +294,45 @@ def test_gitlab_763_no_missing_buckets_after_proc_sharding_failure(cluster: Clus
...
@@ -294,3 +294,45 @@ def test_gitlab_763_no_missing_buckets_after_proc_sharding_failure(cluster: Clus
# All buckets are eventually available to the whole cluster
# All buckets are eventually available to the whole cluster
for
i
in
cluster
.
instances
:
for
i
in
cluster
.
instances
:
Retriable
(
timeout
=
10
,
rps
=
4
).
call
(
check_available_buckets
,
i
,
3000
)
Retriable
(
timeout
=
10
,
rps
=
4
).
call
(
check_available_buckets
,
i
,
3000
)
@pytest.mark.xfail
(
reason
=
"
Not implemented yet
"
)
def
test_expel_blocked_by_bucket_rebalancing
(
cluster
:
Cluster
):
# Need 3 instances for quorum
i1
,
i2
,
i3
=
cluster
.
deploy
(
instance_count
=
3
,
init_replication_factor
=
1
)
i1
.
sql
(
"""
CREATE TABLE somedata (id UNSIGNED PRIMARY KEY, value STRING) DISTRIBUTED BY (id)
"""
)
original_row_count
=
3000
values
=
[]
for
id
in
range
(
original_row_count
):
value
=
str
(
id
)
values
.
append
(
f
"
(
{
id
}
,
'
{
value
}
'
)
"
)
values_str
=
str
.
join
(
"
,
"
,
values
)
i1
.
sql
(
f
"""
INSERT INTO somedata VALUES
{
values_str
}
"""
)
# We have 3 replicasets 1 replica each
total_row_count
=
0
for
instance
in
cluster
.
instances
:
rows_on_instance
=
instance
.
call
(
"
box.space.somedata:count
"
)
assert
rows_on_instance
>
0
total_row_count
+=
rows_on_instance
assert
total_row_count
==
original_row_count
# Expel one of the instances
cluster
.
expel
(
i3
)
Retriable
().
call
(
i3
.
assert_process_dead
)
# We now have 2 replicasets 1 replica each
total_row_count
=
0
for
instance
in
cluster
.
instances
:
if
instance
==
i3
:
continue
rows_on_instance
=
instance
.
call
(
"
box.space.somedata:count
"
)
assert
rows_on_instance
>
0
total_row_count
+=
rows_on_instance
# The buckets must be rebalanced and all of the data still available
assert
total_row_count
==
original_row_count
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