You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/03/30 02:59:47 UTC
[GitHub] [iotdb] qiaojialin commented on pull request #2904: [IOTDB-1257] Make a little bit improvement of config and fix some bugs for setting logic
qiaojialin commented on pull request #2904:
URL: https://github.com/apache/iotdb/pull/2904#issuecomment-809867950
Hi, I'm coming...
> Before this PR, every small request will be expanded to 16m
That's right. This is due to that in TElasticFramedTransport, The following code is only for the shrink. However, the resizeIfNecessary() method could expand if the request size < 16m.
if (size < softMaxLength) {
readBuffer.resizeIfNecessary(softMaxLength);
}
Setting the initial value to 16m is better than the current design. Another way is to split the resizeIfNecessary() to expandIfNecessary() and shrinkIfNecessary().
Then:
if (size < softMaxLength) {
readBuffer.shrinkIfNecessary(softMaxLength);
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org