Skip to content

Conversation

@mrForza
Copy link
Contributor

@mrForza mrForza commented Aug 12, 2025

Before this patch "Finish bucket recovery step ..." logs were printed at
the end of recovery even if no buckets were successfully recovered, it led
to unnecessary log entries. This patch fixes the issue by adding an
additional check for the number of recovered buckets.

Closes #212

NO_DOC=bugfix

@mrForza mrForza force-pushed the mrforza/gh-212-improvement-of-rebalancer-logging branch from 6b1057d to 64cc837 Compare August 15, 2025 09:27
@mrForza mrForza requested a review from Serpentian August 15, 2025 09:42
Copy link
Collaborator

@Serpentian Serpentian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the comments for the first two commits, more comments are coming later) Thank you for working on this, good logging is crucial and allows us to investigate, what happened during incidents

@Serpentian Serpentian assigned mrForza and unassigned Serpentian Aug 20, 2025
@mrForza mrForza force-pushed the mrforza/gh-212-improvement-of-rebalancer-logging branch 3 times, most recently from 5a8b3f8 to f5c25f7 Compare August 22, 2025 15:52
@mrForza mrForza assigned Serpentian and unassigned mrForza Aug 23, 2025
@mrForza mrForza requested a review from Serpentian August 23, 2025 13:17
Copy link
Collaborator

@Serpentian Serpentian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, shit. I forgot to send the last message of review, I'm very sorry

@Serpentian Serpentian assigned mrForza and unassigned Serpentian Aug 25, 2025
@mrForza mrForza force-pushed the mrforza/gh-212-improvement-of-rebalancer-logging branch 2 times, most recently from 04c506f to ccff54f Compare September 10, 2025 07:47
@mrForza mrForza assigned Serpentian and unassigned mrForza Sep 10, 2025
@mrForza mrForza requested a review from Serpentian September 10, 2025 08:07
@Serpentian Serpentian assigned mrForza and unassigned Serpentian Sep 15, 2025
@mrForza mrForza force-pushed the mrforza/gh-212-improvement-of-rebalancer-logging branch 3 times, most recently from 46add65 to a1c095b Compare September 17, 2025 13:22
@mrForza mrForza assigned Serpentian and unassigned mrForza Sep 17, 2025
@Serpentian Serpentian removed their assignment Nov 20, 2025
@Serpentian Serpentian requested a review from Gerold103 November 20, 2025 10:01
Copy link
Collaborator

@Gerold103 Gerold103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch! Great that you have taken this task. These logs really needed some polishing.

@mrForza mrForza force-pushed the mrforza/gh-212-improvement-of-rebalancer-logging branch 2 times, most recently from 9623c34 to 62c138e Compare November 26, 2025 08:35
@mrForza mrForza requested a review from Gerold103 November 26, 2025 09:20
@mrForza mrForza assigned Gerold103 and unassigned Gerold103 Nov 26, 2025
Copy link
Collaborator

@Gerold103 Gerold103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💪✍️

@mrForza mrForza force-pushed the mrforza/gh-212-improvement-of-rebalancer-logging branch from 62c138e to 2ccab27 Compare December 8, 2025 10:35
@mrForza mrForza force-pushed the mrforza/gh-212-improvement-of-rebalancer-logging branch 3 times, most recently from 40bbd59 to cc07222 Compare December 11, 2025 08:27
Before this patch "Finish bucket recovery step ..." logs were printed at
the end of recovery even if no buckets were successfully recovered. It led
to unnecessary log records. This patch fixes the issue by adding an
additional check for the number of recovered buckets.

Part of tarantool#212

NO_DOC=bugfix
This patch introduces logging of buckets' ids which were recovered
during recovery stage of storage.

Part of tarantool#212

NO_DOC=bugfix
@mrForza mrForza force-pushed the mrforza/gh-212-improvement-of-rebalancer-logging branch from cc07222 to b91d290 Compare December 11, 2025 09:18
This patch adds rebalancer routes' logging. The log file now
includes information about the source storage, the number of
buckets, and the destination storage where the buckets will
be moved.

Since the rebalancer service has changed logging of routes that
were sent, we change the `rebalancer/rebalancer.test.lua` and
`rebalancer/stress_add_remove_several_rs.test.lua` tests.

Part of tarantool#212

NO_DOC=bugfix
Before this patch the function `rebalancer_request_state` returned only
nil in case of errors (e.g. presence of SENDING, RECEIVING, GARBAGE
buckets, not active rebalancer). This makes it inconsistent compared to
other rebalancer functions.

Now, in case of errors we return `(nil, err)` instead of `nil`. It can
help us to propagate a meaningful error in rebalancer service. In
addition we throw a new vshard error for cases when the storage has
some non-active buckets during rebalancing and for case when rebalancer
is not active or in progress.

Also we remove "Some buckets are not active" log from
`rebalancer_service_f` because a meaningful error about non-active
buckets is already returned from `rebalancer_download_states`.

NO_TEST=refactoring
NO_DOC=refactoring
Before this patch the function `rebalancer_download_states` didn't
return information about replicaset from which the states could not
be downloaded. As a result, the errors returned from
`rebalancer_download_states` lack of valuable information about
unhealthy replicaset.

Now, we add replicaset.id into error which is returned from the
`rebalancer_download_states`. It can help us to propagate replicaset.id
to rebalancer service.

Closes tarantool#212

NO_DOC=bugfix
@mrForza mrForza force-pushed the mrforza/gh-212-improvement-of-rebalancer-logging branch from b91d290 to 14d9c65 Compare December 15, 2025 14:49
@mrForza mrForza requested a review from Gerold103 December 15, 2025 21:38
Copy link
Collaborator

@Gerold103 Gerold103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀, lets also see if @Serpentian still has any comments unsolved.

Copy link
Collaborator

@Serpentian Serpentian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

@Serpentian Serpentian merged commit 9bd1290 into tarantool:master Dec 22, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve logging of rebalancer and recovery

3 participants