keith-turner commented on PR #3350:
URL: https://github.com/apache/accumulo/pull/3350#issuecomment-1530121983

   > It appears that a 
[check](https://github.com/apache/accumulo/blob/elasticity/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java#L779)
 for tablet metadata being out of date was already added (maybe in 2.1). I 
wonder if there is a way to consolidate some of these things on the tserver 
side.
   
   We may be able to remove that because it based on different assumptions.  It 
assumes the tablet reads the metadata and then only writes to it and is doing 
periodic validation.  We are moving away from what is in memory on the tserver 
being the authority to whats in the metadata table being the authority.
   
   > I wonder if it would just be easier to have a scan iterator on the tablet 
metadata that computes a a single hash value for the tablet metadata in the 
metadata table. The hash could be stored in memory in the TabletMetadata object 
in the TabletServer, and if it's different, then refresh.
   
   That could avoid some uneeded refreshes, the tablet would need to track the 
last few hashes.  
   
    1. bulk import fate operation reads hash A
    2.  a compaction operation adds a file changing the hash to B
    3. the compaction ask  the tserver to refresh getting the file updates from 
the compaction and bulk import and it remembers the current hash of the files 
is B and adds A to the set that tracks the last N hashes.
    4. the refresh request from bulk import arrives with hash A. The tserver 
ignores this because A is one of its previous hashes.
   
   We could also have a file update counter in the tablet.  Every time the set 
of files is updated in the tablet this counter is incremented by one.  This 
increment can be safely done with conditional mutations, its like an atomic 
long in java.  Refresh request just specify the counter they observed asking 
the tablet to update if its current counter is less than the one from the 
refresh RPC.


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