Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/3082

to look at the new patch set (#2).

Change subject: Prevent possible memory leak in TabletServiceImpl
......................................................................

Prevent possible memory leak in TabletServiceImpl

When we allocate a WriteTransactionState in TabletServiceImpl::Write()
we would do so on the heap, but without assigning it to a smart pointer.
Then, right after that, we check that can update the clock and return an
error to the user if we can't. If we returned an error WriteTransctionState
would leak.

This changes the allocation statement to be made closer to where it is
used, after the clock is updated. This also makes it use a smart pointer
(unique_ptr) there and wherever else required. Finally this changes
AlterSchemaTransactionState to use the same smart pointer, for consistency.

Change-Id: I97181d59ea7e2d34067ad1c72edda2d6fc7360d5
---
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet_peer-test.cc
M src/kudu/tablet/tablet_peer.cc
M src/kudu/tablet/tablet_peer.h
M src/kudu/tablet/transactions/alter_schema_transaction.cc
M src/kudu/tablet/transactions/alter_schema_transaction.h
M src/kudu/tablet/transactions/write_transaction.cc
M src/kudu/tablet/transactions/write_transaction.h
M src/kudu/tserver/remote_bootstrap_session-test.cc
M src/kudu/tserver/tablet_service.cc
10 files changed, 57 insertions(+), 38 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/82/3082/2
-- 
To view, visit http://gerrit.cloudera.org:8080/3082
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I97181d59ea7e2d34067ad1c72edda2d6fc7360d5
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves <[email protected]>
Gerrit-Reviewer: Kudu Jenkins

Reply via email to