adds trace logging of tablet state computations#5290
Merged
keith-turner merged 2 commits intoapache:mainfrom Feb 1, 2025
Merged
adds trace logging of tablet state computations#5290keith-turner merged 2 commits intoapache:mainfrom
keith-turner merged 2 commits intoapache:mainfrom
Conversation
Adds trace level logging of the tablet state and tablet goal state. This logging will help understand why the manager is making the decisions it does regarding a particular tablet. For example if the manager is not assigning a tablet that one would expect to be assigned turning on this logging could help. Because the manager uses an iterator to filter tablet metadata in the tablet server, may need to look in the log of manager and tablet servers serving root and metadata tables to see it. Manually tested this by enabling the trace level logging and runnin some ITs. Found a bug with calling TableMetadata.getExtent() in this testing and corrected that.
dlmarion
reviewed
Jan 28, 2025
Comment on lines
+59
to
+60
| log.trace("Computed state of {} for {}", tabletState, | ||
| TabletsSection.encodeRow(tm.getTableId(), tm.getEndRow())); |
Contributor
There was a problem hiding this comment.
I wonder if this should be wrapped with log.isTraceEnabled(). This will always call TabletsSection.encodeRow, right?
Contributor
Author
There was a problem hiding this comment.
Yeah it should, would be good to avoid calling encodeRow().
Contributor
Author
There was a problem hiding this comment.
Updated in 74efc33. Also updated TabletGoalState as it had the same problem.
dlmarion
approved these changes
Jan 29, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds trace level logging of the tablet state and tablet goal state. This logging will help understand why the manager is making the decisions it does regarding a particular tablet. For example if the manager is not assigning a tablet that one would expect to be assigned turning on this logging could help. Because the manager uses an iterator to filter tablet metadata in the tablet server, may need to look in the log of manager and tablet servers serving root and metadata tables to see it.
Manually tested this by enabling the trace level logging and runnin some ITs. Found a bug with calling TableMetadata.getExtent() in this testing and corrected that.