Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/22238 )
Change subject: [tablet] create CompactionOrFlushInput wrapped into shared_ptr ...................................................................... [tablet] create CompactionOrFlushInput wrapped into shared_ptr Prior to this patch, it was necessary to re-wrap pointers to newly created CompactionOrFlushInput objects from std::unique_ptr or raw pointers into std::shared_ptr since MergeCompactionInput::MergeState stores std::shared_ptr<CompactionOrFlushInput> as one of its fields. It resulted in one extra memory allocation compared with a case when using std::make_shared to create CompactionOrFlushInput object wrapped into std::shared_ptr from the very beginning [1]. This patch addresses the issue described above, so now all the related factories of CompactionOrFlushInput objects call std::make_shared to create CompactionOrFlushInput objects wrapped into std::shared_ptr from the very beginning. This patch doesn't contain any functional modifications. [1] https://en.cppreference.com/w/cpp/memory/shared_ptr Change-Id: I442b6ad3780c700bd3b1d357e24dbb2733aff8bf Reviewed-on: http://gerrit.cloudera.org:8080/22121 Tested-by: Alexey Serbin <[email protected]> Reviewed-by: Mahesh Reddy <[email protected]> Reviewed-by: Abhishek Chennaka <[email protected]> (cherry picked from commit 8025576523ecff7429ddf0778729b0afe738bbc6) Reviewed-on: http://gerrit.cloudera.org:8080/22238 --- M src/kudu/tablet/compaction-test.cc M src/kudu/tablet/compaction.cc M src/kudu/tablet/compaction.h M src/kudu/tablet/diskrowset.cc M src/kudu/tablet/diskrowset.h M src/kudu/tablet/memrowset.cc M src/kudu/tablet/memrowset.h M src/kudu/tablet/mock-rowsets.h M src/kudu/tablet/rowset.cc M src/kudu/tablet/rowset.h M src/kudu/tablet/tablet.cc 11 files changed, 67 insertions(+), 74 deletions(-) Approvals: Abhishek Chennaka: Looks good to me, approved Alexey Serbin: Verified -- To view, visit http://gerrit.cloudera.org:8080/22238 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: branch-1.18.x Gerrit-MessageType: merged Gerrit-Change-Id: I442b6ad3780c700bd3b1d357e24dbb2733aff8bf Gerrit-Change-Number: 22238 Gerrit-PatchSet: 2 Gerrit-Owner: Alexey Serbin <[email protected]> Gerrit-Reviewer: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Ashwani Raina <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Mahesh Reddy <[email protected]>
