You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/06/10 13:15:02 UTC
[GitHub] [kafka] ijuma commented on a change in pull request #10848: MINOR Updated transaction index as optional in LogSegmentData.
ijuma commented on a change in pull request #10848:
URL: https://github.com/apache/kafka/pull/10848#discussion_r649171232
##########
File path: storage/api/src/main/java/org/apache/kafka/server/log/remote/storage/LogSegmentData.java
##########
@@ -33,31 +34,32 @@
private final Path logSegment;
private final Path offsetIndex;
private final Path timeIndex;
- private final Path txnIndex;
+ private final Optional<Path> transactionIndex;
private final Path producerSnapshotIndex;
private final ByteBuffer leaderEpochIndex;
/**
* Creates a LogSegmentData instance with data and indexes.
- * @param logSegment actual log segment file
+ *
+ * @param logSegment actual log segment file
* @param offsetIndex offset index file
* @param timeIndex time index file
- * @param txnIndex transaction index file
+ * @param transactionIndex transaction index file, which can be null
* @param producerSnapshotIndex producer snapshot until this segment
* @param leaderEpochIndex leader-epoch-index until this segment
*/
public LogSegmentData(Path logSegment,
Path offsetIndex,
Path timeIndex,
- Path txnIndex,
+ Path transactionIndex,
Review comment:
The Java reasoning is pretty arbitrary and is inconsistent with the Scala recommendation (which we've been following and has worked pretty well for us). I suggest we stick with our approach.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org