[
https://issues.apache.org/jira/browse/CASSANDRA-17650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17556969#comment-17556969
]
Andres de la Peña commented on CASSANDRA-17650:
-----------------------------------------------
I also understand that validation for {{batch_size_fail_threshold}} was skipped
from validation because it already had widening to long, and adding validation
to it would have reduced the max accepted value of the property. This would
have left a max {{batch_size_fail_threshold}} of almost 2GiB, which is much
lower than the previous maximum but probably still high enough for a reasonable
use, I'd say.
So I think that the missed validation is correct at least in 4.0, albeit quite
confusing IMO. We should probably add some comment around if we are not going
to do further changes.
However, in 4.1 and trunk the usage of {{IntKibibytesBound#bytes}} in
{{DatabaseDescriptor#getBatchSizeFailThreshold}} breaks the widening that was
used in the previous branches. So I guess we'll have to either add a method in
{{IntKibibytesBound}} that returns a long, or use validation as suggested and
reduce the max accepted value for {{batch_size_fail_threshold}}. Probably the
former is preferable for backward-compatibility, although int bytes seem more
than enough for {{batch_size_fail_threshold}}. wdyt?
As for 3.0 and 3.11, it seems that there are methods without widening nor
validation. I don't know why those branches weren't fixed by CASSANDRA-15470.
> Check startup and setter validations for batch_size_fail_threshold
> ------------------------------------------------------------------
>
> Key: CASSANDRA-17650
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17650
> Project: Cassandra
> Issue Type: Task
> Components: Local/Config
> Reporter: Ekaterina Dimitrova
> Assignee: Akin Tekeoglu
> Priority: Low
> Fix For: 4.0.x, 4.1.x, 4.x
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> During manual inspection it was noticed that batch_size_warn_threshold goes
> through checkValidForByteConversion, but this is not the case for
> batch_size_fail_threshold.
> This ticket is opened to check whether this is a bug or not.
> If it is confirmed it is a bug it needs to be fixed and the ticket can be
> changed to type bug. It seems that this validation was added as part of
> CASSANDRA-15470 to 4.0+. Maybe we also need it in 3.0 and 3.11?
> CC [~adelapena]
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]