HBASE-19732 Replica regions does not return back the MSLAB chunks to pool
(Ram)
This commit is contained in:
parent
e014e5f8ef
commit
f23fd7208b
|
@ -2283,6 +2283,7 @@ public class HStore implements Store, HeapSize, StoreConfigInformation, Propagat
|
||||||
long snapshotId = -1; // -1 means do not drop
|
long snapshotId = -1; // -1 means do not drop
|
||||||
if (dropMemstoreSnapshot && snapshot != null) {
|
if (dropMemstoreSnapshot && snapshot != null) {
|
||||||
snapshotId = snapshot.getId();
|
snapshotId = snapshot.getId();
|
||||||
|
snapshot.close();
|
||||||
}
|
}
|
||||||
HStore.this.updateStorefiles(storeFiles, snapshotId);
|
HStore.this.updateStorefiles(storeFiles, snapshotId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ package org.apache.hadoop.hbase.regionserver;
|
||||||
|
|
||||||
import org.apache.yetus.audience.InterfaceAudience;
|
import org.apache.yetus.audience.InterfaceAudience;
|
||||||
|
|
||||||
|
import java.io.Closeable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
/**
|
/**
|
||||||
* Holds details of the snapshot taken on a MemStore. Details include the snapshot's identifier,
|
* Holds details of the snapshot taken on a MemStore. Details include the snapshot's identifier,
|
||||||
|
@ -26,7 +27,7 @@ import java.util.List;
|
||||||
* all the cells and a scanner to read all cells in it.
|
* all the cells and a scanner to read all cells in it.
|
||||||
*/
|
*/
|
||||||
@InterfaceAudience.Private
|
@InterfaceAudience.Private
|
||||||
public class MemStoreSnapshot {
|
public class MemStoreSnapshot implements Closeable {
|
||||||
private final long id;
|
private final long id;
|
||||||
private final int cellsCount;
|
private final int cellsCount;
|
||||||
private final long dataSize;
|
private final long dataSize;
|
||||||
|
@ -90,4 +91,13 @@ public class MemStoreSnapshot {
|
||||||
public boolean isTagsPresent() {
|
public boolean isTagsPresent() {
|
||||||
return this.tagsPresent;
|
return this.tagsPresent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void close() {
|
||||||
|
if (this.scanners != null) {
|
||||||
|
for (KeyValueScanner scanner : scanners) {
|
||||||
|
scanner.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue