Yeah, this is actually a cleaner and more solid approach that allows
multiple compactions to happen with very long outstanding scans.
Otherwise, you'll have to parse Files:<ag> entries to ignore #
prefixed files yourself anyway :)
On May 16, 4:08 pm, "Doug Judd" <
d...@zvents.com> wrote:
> Actually, maybe it's not so hard to implement your suggestion. The
> AccessGroup can maintain a map of <ts> -> refcount. The <ts> refers to
> compaction time. When a scanner gets created, it can record the latest <ts>
> and update its refcount. In the destructor it decrements the <ts> refcount
> and can delete the Files:<ag>:<ts> column if the refcount drops to zero.
>
> The additional complexity happens in the case where a RangeServer gets
> killed with outstanding scanners. When it comes up it will have to scan the
> Files: column and delete any existing Files:<ag>:<ts> columns.
You probably want to promote the latest Files:<ag>:<ts> to Files:<ag>
in this case.
> a little more work on my end, but if it makes your life easier, I'm ok with
> it. :)
Not only it makes my life easier, it's a more robust design as well. A
win-win situation :)