Avoid reusing an old ClientTabletCache after it is invalidated
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 487
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 13
Description
> The BatchWriter, BatchScanner, and ConditoinalWriter get a reference to a tablet locator and then keep it. So then something like the following could happen
>
> 1. Create a BatchWriter which gets a ref to a cache C1 for table TAB1.
> 2. clearTabletLocationCache() is called
> 3. Create a BatchWriter which gets a ref to a cache C2 for table TAB1
>
> So now there two batch writers that reference two different cache instances for the same table. Things probably should not hold on to references to the cache. The code seems to do that because it wraps the cache w/ decorator objects.
_Originally posted by @keith-turner in https://github.com/apache/accumulo/pull/5421#discussion_r2015052826_
Contributor guide
Assessment
This issue has not been assessed yet.