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
@mrForza mrForza requested a review from Serpentian September 17, 2025 13:23
@mrForza mrForza force-pushed the mrforza/gh-212-improvement-of-rebalancer-logging branch from a1c095b to 1da8c2c Compare September 17, 2025 13:48
@Serpentian Serpentian assigned mrForza and unassigned Serpentian Sep 19, 2025
@mrForza mrForza force-pushed the mrforza/gh-212-improvement-of-rebalancer-logging branch from 1da8c2c to f07abe5 Compare September 19, 2025 16:18
@mrForza mrForza assigned Serpentian and unassigned mrForza Sep 19, 2025
@mrForza mrForza requested a review from Serpentian September 19, 2025 18:23
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 final comments I have, the patch is pretty clean now)

@Serpentian Serpentian assigned mrForza and unassigned Serpentian Sep 30, 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 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 2 times, most recently from 871197d to 489b425 Compare October 3, 2025 08:18
@mrForza mrForza requested a review from Serpentian October 3, 2025 09:46
@mrForza mrForza assigned Serpentian and unassigned mrForza Oct 3, 2025
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.

Final nits

end)
t.assert(g.replica_1_a:grep_log(
'Apply rebalancer routes with 1 workers'))
end)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: the indent is not correct here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed. I also changed indents on 211-214 lines.

end
log.info('Rebalance routes are sent. Schedule next wakeup after '..
'%f seconds', consts.REBALANCER_WORK_INTERVAL)
log.info('Next rebalancer routes were sent: %s. Schedule next ' ..
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: sounds incorrect gramatically) Let's better say The following rebalancer routes were sent, or you can just leave as it was in order not to change the existing tests)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

g.replica_2_a:replicaset_uuid())
t.assert(g.replica_1_a:grep_log(rebalancer_routes_msg))
start_bucket_move(g.replica_1_a, g.replica_2_a, moved_bucket_from_2)
start_bucket_move(g.replica_1_a, g.replica_3_a, moved_bucket_from_3)
Copy link
Collaborator

Choose a reason for hiding this comment

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

You're moving the buckets with rebalancer, why do you need to manually move them then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@Serpentian Serpentian assigned mrForza and unassigned Serpentian Oct 8, 2025
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_download_states` didn't
return information about replicaset from which the states could not
be downloaded. As a result, the log "Some buckets are not active
..." lacks of valuable information about unhealthy replicaset.

Now, we return `(replicaset.id, nil)` instead of `nil` in case when
rebalancer can't download state from this replicaset. Also we add
replicaset.id in "Some buckets are not active ..." log.

Also we change `rebalancer/rebalancer.test.lua` test which expected
the old "Some buckets are not active" log without replicaset.id.

Closes tarantool#212

NO_DOC=bugfix
@mrForza mrForza force-pushed the mrforza/gh-212-improvement-of-rebalancer-logging branch from 489b425 to fce8f28 Compare October 9, 2025 09:21
@mrForza mrForza removed their assignment Oct 10, 2025
@mrForza mrForza requested a review from Serpentian October 10, 2025 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve logging of rebalancer and recovery

3 participants