You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by to...@apache.org on 2019/06/19 07:11:25 UTC

[kudu] 02/02: DeltaPreparer: use vectors instead of deques

This is an automated email from the ASF dual-hosted git repository.

todd pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit c9a925b1766faf5a77e0e56aaccd5923bc980530
Author: Todd Lipcon <to...@apache.org>
AuthorDate: Tue Jun 18 01:13:10 2019 -0700

    DeltaPreparer: use vectors instead of deques
    
    We had a few std::deque<>s in this class that seem like they could just
    as well use vectors. Vectors are a simpler data structure, so may as
    well use it instead.
    
    Change-Id: I4161d1dfbf91294f36487da077baaa5a61dd014e
    Reviewed-on: http://gerrit.cloudera.org:8080/13668
    Tested-by: Kudu Jenkins
    Reviewed-by: Grant Henke <gr...@apache.org>
    Reviewed-by: Alexey Serbin <as...@cloudera.com>
---
 src/kudu/tablet/delta_store.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/kudu/tablet/delta_store.h b/src/kudu/tablet/delta_store.h
index b15e2f0..069600e 100644
--- a/src/kudu/tablet/delta_store.h
+++ b/src/kudu/tablet/delta_store.h
@@ -493,10 +493,10 @@ class DeltaPreparer : public PreparedDeltas {
 
   // A row whose last relevant mutation was DELETE (or REINSERT).
   //
-  // These deques are disjoint; a row that was both deleted and reinserted will
+  // These lists are disjoint; a row that was both deleted and reinserted will
   // not be in either.
-  std::deque<rowid_t> deleted_;
-  std::deque<rowid_t> reinserted_;
+  std::vector<rowid_t> deleted_;
+  std::vector<rowid_t> reinserted_;
 
   // The deletion state of the row last processed by AddDelta().
   //
@@ -515,7 +515,7 @@ class DeltaPreparer : public PreparedDeltas {
     DeltaKey key;
     Slice val;
   };
-  std::deque<PreparedDelta> prepared_deltas_;
+  std::vector<PreparedDelta> prepared_deltas_;
 
   // State when prepared_for_ & PREPARED_FOR_SELECT
   // ------------------------------------------------------------