HBASE-11887 Memory retention in branch-1; millions of instances of LiteralByteString for column qualifier and value

This commit is contained in:
stack 2014-09-03 14:19:47 -07:00
parent fc27fb0241
commit 9d9d206d21
1 changed files with 14 additions and 3 deletions

View File

@ -39,9 +39,9 @@ import com.google.protobuf.Message;
*/
@InterfaceAudience.Private
public class CallRunner {
private final Call call;
private final RpcServerInterface rpcServer;
private final MonitoredRPCHandler status;
private Call call;
private RpcServerInterface rpcServer;
private MonitoredRPCHandler status;
private UserProvider userProvider;
/**
@ -65,6 +65,16 @@ public class CallRunner {
return call;
}
/**
* Cleanup after ourselves... let go of references.
*/
private void cleanup() {
this.call = null;
this.rpcServer = null;
this.status = null;
this.userProvider = null;
}
public void run() {
try {
if (!call.connection.channel.isOpen()) {
@ -141,6 +151,7 @@ public class CallRunner {
} finally {
// regardless if successful or not we need to reset the callQueueSize
this.rpcServer.addCallSize(call.getSize() * -1);
cleanup();
}
}