Hello Kudu Jenkins, Adar Dembo,

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

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

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

Change subject: [util] Fix comment of faststring
......................................................................

[util] Fix comment of faststring

1. Under any case, capacity() is greater than or equal to
   the data length. If the current length is shorter than
   kInitialCapacity, after call shrink_to_fit(),
   capacity() will go down to kInitialCapacity.
2. The caller must be responsible for releasing the pointer
   release() returns.

Now In `GrowByAtLeast()`, to_reserve (i.e. `len_ + count`)
is usually larger than we really need. This commit also
calculate an exact value when we try to expand the faststring.

To be clearer, this commit rename `GrowByAtLeast()` to
`GrowToAtLeast()`, and make the newcapacity as its argument.

Note: If the capacity needs to grow, it still expand by
at least 50% each time.

Change-Id: Ie4bd4f31216fdf5cfbf70526f1358824fbda225a
---
M src/kudu/util/faststring-test.cc
M src/kudu/util/faststring.cc
M src/kudu/util/faststring.h
3 files changed, 71 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/04/14604/4
--
To view, visit http://gerrit.cloudera.org:8080/14604
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie4bd4f31216fdf5cfbf70526f1358824fbda225a
Gerrit-Change-Number: 14604
Gerrit-PatchSet: 4
Gerrit-Owner: Anonymous Coward <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Anonymous Coward <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)

Reply via email to