Mahesh Reddy has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/22478 )

Change subject: KUDU-613: Fix BlockCache Constructor
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/22478/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/22478/1//COMMIT_MSG@11
PS1, Line 11: policy. This patch fixes this miscalculation.
            :
> Is there a chance to have basic/smoke test scenario to protect against an i
I was thinking about adding an ASSERT statement after calculating the 
capacities for them both adding up to block_cache_capacity. The issue is for 
larger values, it would fail due to precision loss. I'm not sure how to add one 
that accounts for the regular expected case and one would that accounts for 
cases with larger values since the precision loss would be different depending 
on how large the value is.


http://gerrit.cloudera.org:8080/#/c/22478/1/src/kudu/cfile/block_cache.cc
File src/kudu/cfile/block_cache.cc:

http://gerrit.cloudera.org:8080/#/c/22478/1/src/kudu/cfile/block_cache.cc@253
PS1, Line 253: static_cast<int6
> What if the result number before this cast here and below is greater than 2
Good point, casted it to a int64. As for the loss of precision for large double 
values, I'm not too sure what else can be done there. If we could somehow avoid 
it being a large double value, that could help avoid precision loss. One way 
around this would be omitting the protected_segment_percentage parameter and 
having the user input the capacities for both segments. Any ideas are welcome, 
thanks for bringing this up.



--
To view, visit http://gerrit.cloudera.org:8080/22478
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Icfde56fd766ba7160052e88ca09a63845f3297c6
Gerrit-Change-Number: 22478
Gerrit-PatchSet: 2
Gerrit-Owner: Mahesh Reddy <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <[email protected]>
Gerrit-Comment-Date: Wed, 12 Feb 2025 19:33:50 +0000
Gerrit-HasComments: Yes

Reply via email to