accumulo
accumulo copied to clipboard
Always initiate log recovery for tablets
Currently in the elasticity branch walog recovery is only done when tablet is hosted on a tablet server. With the introduction of on demand tablets its possible that after a tablet server fails that the tablet is never rehosted and data for the logs is never recovered from the tablets. This has two negative consequences. First it will prevent Accumulo GC from ever deleting those walogs. Second it will prevent the data from ever being seen by eventual scans. Tablets in this state should be recovered ASAP to avoid these problems.
The easiest solution to implement for this problem it to have the manager host any tablets it sees in this condition. Discussed a possibly more elegant solution with @dlmarion which is the following.
- Move the recovery code out of the Tablet constructor into independently callable code.
- Make tablet log recovery an operation tablet servers could execute independent of hosting a tablet
- Make the manager schedule tablet log recovery operations when needed, even if a tablet does not need to be hosted.
- Make the manager only try to assign tablets w/o walogs
- Make the tablet sever refuse to host any tablet w/ walogs
If possible in the above solution it would be nice if walog data could be read directly from the walog and written to an rfile for log recovery. The current log recovery code in the tablet loads the recovered data into memory and then minor compacts. Would still need to pass the data through the tablets configured iterators either way.
Closing #3880 as a duplicate. As mentioned in comments on that issue, do not want to let walogs linger indefinitely. So may want to host tablets that have a hosting goal of never or ondemand if they have walogs.