[email protected] has posted comments on this change. ( http://gerrit.cloudera.org:8080/14604 )
Change subject: [util] Fix comment of faststring ...................................................................... Patch Set 2: (1 comment) http://gerrit.cloudera.org:8080/#/c/14604/1/src/kudu/util/faststring.h File src/kudu/util/faststring.h: http://gerrit.cloudera.org:8080/#/c/14604/1/src/kudu/util/faststring.h@239 PS1, Line 239: GrowByAtLeast(len_ + count - capacity_); > There were also a lot of non-Python failures: http://dist-test.cloudera.org I know the reason, because in `GrowByAtLeast()`, `to_reserve` should be equal to `capacity_ + count`, instead of `len_ + count`. For example: when capacity_=32, len_=10, if you need `Append()` with a length of 40, then the memory size we need to expand should be at least (10 + 40 - 32 = 18), and In the original implementation, `len_ + count` was used as the total capacity, which is 10 + 18 = 28, which is wrong. It should be `capacity + count`, ie 32+18 = 50 -- 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: comment Gerrit-Change-Id: Ie4bd4f31216fdf5cfbf70526f1358824fbda225a Gerrit-Change-Number: 14604 Gerrit-PatchSet: 2 Gerrit-Owner: Anonymous Coward <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Anonymous Coward <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Comment-Date: Fri, 01 Nov 2019 06:48:12 +0000 Gerrit-HasComments: Yes
