-
Notifications
You must be signed in to change notification settings - Fork 35
Improve logging of rebalancer and recovery #586
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
Open
mrForza
wants to merge
5
commits into
tarantool:master
Choose a base branch
from
mrForza:mrforza/gh-212-improvement-of-rebalancer-logging
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
b57d254
recovery: reduce spam of "Finish bucket recovery step" logs
mrForza eefe222
recovery: add logging of recovered buckets
mrForza c05dff5
rebalancer: add logging of routes
mrForza 9d69cc6
rebalancer: refactoring of rebalancer_request_state
mrForza 62c138e
rebalancer: add replicaset.id into rebalancer_request_state errors
mrForza File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -149,6 +149,14 @@ local function wait_for_bucket_is_transferred(src_storage, dest_storage, | |
| end, {bucket_id}) | ||
| end | ||
|
|
||
| local function move_bucket(src_storage, dest_storage, bucket_id) | ||
| src_storage:exec(function(bucket_id, replicaset_id) | ||
| local res, err = ivshard.storage.bucket_send(bucket_id, replicaset_id) | ||
| t.assert(res and not err, 'Error during transferring bucket') | ||
| end, {bucket_id, dest_storage:replicaset_uuid()}) | ||
| wait_for_bucket_is_transferred(src_storage, dest_storage, bucket_id) | ||
| end | ||
|
|
||
| -- | ||
| -- Reduce spam of "Finish bucket recovery step" logs and add logging of | ||
| -- recovered buckets in recovery service (gh-212). | ||
|
|
@@ -196,3 +204,26 @@ test_group.test_no_logs_while_unsuccess_recovery = function(g) | |
| wait_for_bucket_is_transferred(g.replica_2_a, g.replica_1_a, | ||
| hanged_bucket_id_2) | ||
| end | ||
|
|
||
| -- | ||
| -- Add logging of routes in rebalancer service (gh-212). | ||
| -- | ||
| test_group.test_rebalancer_routes_logging = function(g) | ||
| local moved_bucket_from_2 = vtest.storage_first_bucket(g.replica_2_a) | ||
| move_bucket(g.replica_2_a, g.replica_1_a, moved_bucket_from_2) | ||
| local moved_bucket_from_3 = vtest.storage_first_bucket(g.replica_3_a) | ||
| move_bucket(g.replica_3_a, g.replica_1_a, moved_bucket_from_3) | ||
| t.helpers.retrying({timeout = 60}, function() | ||
| g.replica_1_a:exec(function() ivshard.storage.rebalancer_wakeup() end) | ||
|
Collaborator
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. If this is the test case for which you have enabled the rebalancer in the first commit, then please, 1) enable the rebalancer here, 2) disable it in the end of the test case. |
||
| t.assert(g.replica_1_a:grep_log('Apply rebalancer routes with 1 ' .. | ||
| 'workers')) | ||
| end) | ||
| local rebalancer_routes_msg = string.format( | ||
| "{\"%s\":{\"%s\":1}}", g.replica_1_a:replicaset_uuid(), | ||
| g.replica_2_a:replicaset_uuid()) | ||
| t.helpers.retrying({}, function() | ||
| t.assert(g.replica_1_a:grep_log(rebalancer_routes_msg)) | ||
| g.replica_1_a:exec(function() ivshard.storage.rebalancer_wakeup() end) | ||
| g.replica_1_a:grep_log('The cluster is balanced ok.') | ||
| end) | ||
Serpentian marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Please, give it a long timeout. Otherwise this test will be flaky.