keith-turner opened a new issue, #3301:
URL: https://github.com/apache/accumulo/issues/3301

   **Describe the bug**
   
   While working on #3284 I noticed that 
[ManagerMetadataUtil.updateLastForAssignmentMode()](https://github.com/apache/accumulo/blob/15c9f55280f4ce28a80b800f1e05128f33c85db3/server/base/src/main/java/org/apache/accumulo/server/util/ManagerMetadataUtil.java#L261-L270)
 is doing a metadata reads during tablet location updates.  Not sure, but may 
be able to avoid this read by passing information from earlier metadata reads.
   
   One place updateLastForAssignmentMode() is called is in 
[MetaDataStateStore](https://github.com/apache/accumulo/blob/15c9f55280f4ce28a80b800f1e05128f33c85db3/server/base/src/main/java/org/apache/accumulo/server/manager/state/MetaDataStateStore.java#L110)
 where the available TabletLocationState may have the last location obtained in 
[MetaDataTableScanner](https://github.com/apache/accumulo/blob/main/server/base/src/main/java/org/apache/accumulo/server/manager/state/MetaDataTableScanner.java#L198)
 when scanning the metadata table.  So if that information about the last 
location could be passed from the scan, then the information could be obtained  
more efficiently.  Getting the information from a scan of the metadata table 
avoids the RPC per tablet to get the information.
   
   Another place updateLastForAssignmentMode() is called is when 
TabletStateStore.setLocation() is called in 
[AssignmentHandler](https://github.com/apache/accumulo/blob/15c9f55280f4ce28a80b800f1e05128f33c85db3/server/tserver/src/main/java/org/apache/accumulo/tserver/AssignmentHandler.java#L185).
  Earlier in the AssignmentHandler code it reads the tablets metadata and could 
pass that to TabletStateStore.setLocation() which could pass it to 
updateLastForAssignmentMode().
   
   **Expected behavior**
   
   Last location is obtained via leveraging existing metadata reads, if 
possible, rather than doing a new one.


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