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 @InterfaceAudience.Private
public class CallRunner { public class CallRunner {
private final Call call; private Call call;
private final RpcServerInterface rpcServer; private RpcServerInterface rpcServer;
private final MonitoredRPCHandler status; private MonitoredRPCHandler status;
private UserProvider userProvider; private UserProvider userProvider;
/** /**
@ -65,6 +65,16 @@ public class CallRunner {
return call; 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() { public void run() {
try { try {
if (!call.connection.channel.isOpen()) { if (!call.connection.channel.isOpen()) {
@ -141,6 +151,7 @@ public class CallRunner {
} finally { } finally {
// regardless if successful or not we need to reset the callQueueSize // regardless if successful or not we need to reset the callQueueSize
this.rpcServer.addCallSize(call.getSize() * -1); this.rpcServer.addCallSize(call.getSize() * -1);
cleanup();
} }
} }