-
Notifications
You must be signed in to change notification settings - Fork 15
TNTP-2109: Switch to "safe" mode on vshard rebalance #462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
67260d0
9b79a68
7730a5c
8898804
358d0ac
475590a
90e1fa2
1fa88c7
eefef58
5f3f46f
339ca8f
0c6370f
6683748
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,12 +67,13 @@ end | |
| -- @return[1] table func_args | ||
| -- @return[2] table replicaset | ||
| -- @return[3] string replicaset_id | ||
| -- @return[4] table bucket_ids | ||
| function BaseIterator:get() | ||
| local replicaset_id = self.next_index | ||
| local replicaset = self.next_replicaset | ||
| self.next_index, self.next_replicaset = next(self.replicasets, self.next_index) | ||
|
|
||
| return self.func_args, replicaset, replicaset_id | ||
| return self.func_args, replicaset, replicaset_id, {} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please write 4th return name in doc for method
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
| end | ||
|
|
||
| return BaseIterator | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,6 +68,7 @@ end | |
| -- @return[1] table func_args | ||
| -- @return[2] table replicaset | ||
| -- @return[3] string replicaset_id | ||
| -- @return[4] table bucket_ids | ||
| function BatchInsertIterator:get() | ||
| local replicaset_id = self.next_index | ||
| local replicaset = self.next_batch.replicaset | ||
|
|
@@ -76,10 +77,11 @@ function BatchInsertIterator:get() | |
| self.next_batch.tuples, | ||
| self.opts, | ||
| } | ||
| local bucket_ids = self.next_batch.bucket_ids | ||
|
|
||
| self.next_index, self.next_batch = next(self.batches_by_replicasets, self.next_index) | ||
|
|
||
| return func_args, replicaset, replicaset_id | ||
| return func_args, replicaset, replicaset_id, bucket_ids | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please write 4th return name in doc for method
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
| end | ||
|
|
||
| return BatchInsertIterator | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -76,6 +76,7 @@ end | |
| -- @return[1] table func_args | ||
| -- @return[2] table replicaset | ||
| -- @return[3] string replicaset_id | ||
| -- @return[4] table bucket_ids | ||
| function BatchUpsertIterator:get() | ||
| local replicaset_id = self.next_index | ||
| local replicaset = self.next_batch.replicaset | ||
|
|
@@ -85,10 +86,11 @@ function BatchUpsertIterator:get() | |
| self.next_batch.operations, | ||
| self.opts, | ||
| } | ||
| local bucket_ids = self.next_batch.bucket_ids | ||
|
|
||
| self.next_index, self.next_batch = next(self.batches_by_replicasets, self.next_index) | ||
|
|
||
| return func_args, replicaset, replicaset_id | ||
| return func_args, replicaset, replicaset_id, bucket_ids | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please write 4th return name in doc for method
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
| end | ||
|
|
||
| return BatchUpsertIterator | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from here?
https://github.com/tarantool/vshard/blob/1f4c2ccfad6419882d1801d85f2b801f7b54b813/vshard/router/init.lua#L678-L713
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but very very simplified. Mostly because
bucket_set()can't be accessed from outside vshard.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a comment about vshard above