keith-turner commented on code in PR #3482:
URL: https://github.com/apache/accumulo/pull/3482#discussion_r1227144377


##########
server/base/src/main/java/org/apache/accumulo/server/metadata/TabletMutatorBase.java:
##########
@@ -170,15 +170,15 @@ protected String getLocationFamily(LocationType type) {
   @Override
   public T putLocation(Location location) {
     Preconditions.checkState(updatesEnabled, "Cannot make updates after 
calling mutate.");
-    mutation.put(getLocationFamily(location.getType()), location.getSession(),
-        location.getHostPort());
+    mutation.put(getLocationFamily(location.getType()), "",
+        location.getServerInstance().toString());

Review Comment:
   > I was wondering why the sessionId was in the colq to begin with, that 
seems like it would allow more than one entry for the location type in the 
metadata table.
   
   I do not know of a specific reason why it was structured that way.  It did 
allow detection of certain bugs like if the manager set a location on a tablet 
that already had a location, but I don't think that is why it was structured 
that way.  Using conditional mutations can help avoid these bugs instead of 
detecting them after the fact.  We could take this a step further and push the 
current vs future designation into the value and have a single column for 
location.



-- 
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]

Reply via email to