Amend HBASE-20322 CME in StoreScanner causes region server crash

memStoreScanners is immutable so create a new list for closing.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
This commit is contained in:
Thiruvel Thirumoolan 2018-03-30 13:12:53 -07:00 committed by Andrew Purtell
parent 875a12de05
commit 9ced0c936f

View File

@ -859,7 +859,8 @@ public class StoreScanner extends NonReversedNonLazyKeyValueScanner
try {
if (this.closing) {
// Lets close scanners created by caller, since close() won't notice this.
clearAndClose(memStoreScanners);
// memStoreScanners is immutable, so lets create a new list.
clearAndClose(new ArrayList<>(memStoreScanners));
return;
}
flushed = true;