Add more clear logs when oap-cluster-internal data format is inconcsistent#13059
Merged
Add more clear logs when oap-cluster-internal data format is inconcsistent#13059
Conversation
…ormat is inconsistent.
wankai123
approved these changes
Feb 21, 2025
wu-sheng
commented
Feb 21, 2025
| String nextWorkerName = message.getNextWorkerName(); | ||
| RemoteData remoteData = message.getRemoteData(); | ||
|
|
||
| try { |
Member
Author
There was a problem hiding this comment.
I don't change much. I just replaced this try/catch by several others.
kezhenxu94
reviewed
Feb 21, 2025
| remoteInTargetNotFoundCounter.inc(); | ||
| LOGGER.warn( | ||
| "Data is discarded due to worker not found. Check OAL/MAL script, make sure they are aligned in the whole cluster. The data is {}", | ||
| message |
Member
There was a problem hiding this comment.
I think this is unhelpful. Message doesn't have a readable toString representation
Member
Author
There was a problem hiding this comment.
This is a proto object. Isn't it output the data? I read this from decompiling codes.
@Override
public final String toString() {
return TextFormat.printer().printToString(this);
}
Member
Author
There was a problem hiding this comment.
For safety, I run the demo codes locally
public static void main(String[] args) {
RemoteMessage obj = RemoteMessage.newBuilder()
.setNextWorkerName("dbc").build();
System.out.println("Default toString(): " + obj.toString());
System.out.println("TextFormat: " + TextFormat.printer().printToString(obj));
try {
System.out.println("JsonFormat: " + JsonFormat.printer().print(obj));
} catch (Exception e) {
e.printStackTrace();
}
}Default toString(): nextWorkerName: "dbc"
TextFormat: nextWorkerName: "dbc"
JsonFormat: {
"nextWorkerName": "dbc"
}
kezhenxu94
approved these changes
Feb 21, 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.
CHANGESlog.