You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ijuma (via GitHub)" <gi...@apache.org> on 2023/03/03 04:36:06 UTC
[GitHub] [kafka] ijuma commented on a diff in pull request #13304: KAFKA-14726 Move/rewrite of LogReadInfo, LogOffsetSnapshot, LogStartOffsetIncrementReason to storage module
ijuma commented on code in PR #13304:
URL: https://github.com/apache/kafka/pull/13304#discussion_r1124016717
##########
storage/src/main/java/org/apache/kafka/storage/internals/log/FetchDataInfo.java:
##########
@@ -44,6 +45,28 @@ public FetchDataInfo(LogOffsetMetadata fetchOffsetMetadata,
this.abortedTransactions = abortedTransactions;
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ FetchDataInfo that = (FetchDataInfo) o;
+
+ return firstEntryIncomplete != that.firstEntryIncomplete &&
+ Objects.equals(fetchOffsetMetadata, that.fetchOffsetMetadata) &&
+ Objects.equals(records, that.records) &&
Review Comment:
What's the point of having these methods implemented though? For example, what does it mean to compare a list of aborted transactions? Unless there are clear semantics, we're better off relying on reference equality only.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org