dajac commented on code in PR #17580:
URL: https://github.com/apache/kafka/pull/17580#discussion_r1871395994
##########
share-coordinator/src/main/java/org/apache/kafka/coordinator/share/ShareCoordinatorShard.java:
##########
@@ -296,6 +296,94 @@ public CoordinatorResult<WriteShareGroupStateResponseData,
CoordinatorRecord> wr
return new CoordinatorResult<>(Collections.singletonList(record),
responseData);
}
+ /**
+ * Method reads data from the soft state and if needed updates the leader
epoch.
+ * It can happen that a read state call for a share partition has a higher
leaderEpoch
+ * value than seen so far.
+ * In case an update is not required, empty record list will be generated
along with a success response.
+ * @param request - represents ReadShareGroupStateRequestData
+ * @return CoordinatorResult object
+ */
+ public CoordinatorResult<ReadShareGroupStateResponseData,
CoordinatorRecord> readStateAndMaybeUpdateLeaderEpoch(
+ ReadShareGroupStateRequestData request
+ ) {
+ // only one key will be there in the request by design
Review Comment:
small nit: it noticed that your comments are inconsistent. sometimes they
start with a capital letter, sometimes they don't. sometimes they end with a
`.`, sometimes they don't. i don't have a preference for any format but i do
care about consistency :)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]