[
https://issues.apache.org/jira/browse/RATIS-603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16939282#comment-16939282
]
Tsz-wo Sze commented on RATIS-603:
----------------------------------
Thanks for the update.
- Let's do not add SMEntryWithData in SegmentedRaftLog. Just add
{code}
//RaftLog
+ public String toLogEntryString(LogEntryProto logEntry) {
+ return ServerProtoUtils.toLogEntryString(logEntry);
+ }
{code}
change EntryWithData.toString() to use it
{code}
//RaftLog.EntryWithData
@Override
public String toString() {
- return ServerProtoUtils.toLogEntryString(logEntry);
+ return toLogEntryString(logEntry);
}
{code}
and then override in SegmentedRaftLog
{code}
//SegmentedRaftLog
@Override
public String toLogEntryString(LogEntryProto logEntry) {
return ServerProtoUtils.toLogEntryString(logEntry, stateMachine);
}
{code}
> Add a logStringSupplier for RaftServerImpl to optionally print SmLogEntry on
> errors
> -----------------------------------------------------------------------------------
>
> Key: RATIS-603
> URL: https://issues.apache.org/jira/browse/RATIS-603
> Project: Ratis
> Issue Type: New Feature
> Components: server
> Affects Versions: 0.4.0
> Reporter: Mukul Kumar Singh
> Assignee: Mukul Kumar Singh
> Priority: Major
> Labels: ozone
> Attachments: RATIS-603.001.patch, RATIS-603.002.patch,
> RATIS-603.003.patch, RATIS-603.004.patch, RATIS-603.005.patch
>
>
> This jira proposes to add a SmLogEntryProto to toString converter so that
> logEntry information can be printed on errors/exceptions.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)