Repository: hbase Updated Branches: refs/heads/branch-1 fc27fb024 -> 9d9d206d2
HBASE-11887 Memory retention in branch-1; millions of instances of LiteralByteString for column qualifier and value Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/9d9d206d Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/9d9d206d Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/9d9d206d Branch: refs/heads/branch-1 Commit: 9d9d206d2151c193d6156cb7b7dc4fa6b0fdfbb8 Parents: fc27fb0 Author: stack <st...@apache.org> Authored: Wed Sep 3 14:19:47 2014 -0700 Committer: stack <st...@apache.org> Committed: Wed Sep 3 14:19:47 2014 -0700 ---------------------------------------------------------------------- .../org/apache/hadoop/hbase/ipc/CallRunner.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/9d9d206d/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java index 05fd873..84c1f12 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java @@ -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(); } }