keith-turner commented on code in PR #6354:
URL: https://github.com/apache/accumulo/pull/6354#discussion_r3171560514
##########
core/src/main/java/org/apache/accumulo/core/fate/FateKey.java:
##########
@@ -200,14 +195,6 @@ private static Optional<ExternalCompactionId>
deserializeCompactionId(FateKeyTyp
};
}
- private static Optional<TServerInstance> deserializeTserverId(FateKeyType
type,
- DataInputBuffer buffer) throws IOException {
- return switch (type) {
- case SPLIT, MERGE, COMPACTION_COMMIT -> Optional.empty();
- case TSERVER_SHUTDOWN -> Optional.of(new
TServerInstance(buffer.readUTF()));
- };
- }
-
Review Comment:
That code was added in #6224. That code is used to ensure there is only a
single fate operations to shutdown a specific tserver running at time. I was
just following the pattern of the other code when adding that new fate key
type. However it usage differs, we never need to read it. For compaction fate
keys those need to be read for dead compaction detection. So since we never
read it, it did not need to follow the pattern of the other types. Seems ok to
remove it and the parts left behind are still in use.
This
[code](https://github.com/apache/accumulo/blob/17732045b8c4ec2248d93403306705a71d982594/server/manager/src/main/java/org/apache/accumulo/manager/ManagerClientServiceHandler.java#L349)
uses the fate key to ensure only one operation is initiated per a tserver.
The serialized data is used for the FateKey hashcode and equals functions, so
that seems like it will still work for comparing them to dedupe.
--
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]