[ 
https://issues.apache.org/jira/browse/CASSANDRA-17650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17556991#comment-17556991
 ] 

Ekaterina Dimitrova commented on CASSANDRA-17650:
-------------------------------------------------

{quote}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.
{quote}
+1
{quote}However, in 4.1 and trunk the usage of {{IntKibibytesBound#bytes}} in 
{{DatabaseDescriptor#getBatchSizeFailThreshold}} breaks the widening that was 
used in the previous branches. 
{quote}
You are right, good catch! Marking the ticket as a blocker. I suggest we keep 
the backward compatibility with 4.0 by adding a method that returns long bytes. 
Something like _toBytesInLong_ in {_}IntKibibytesBound{_}. It seems that 
_batch_size_fail_threshold_ is the only parameter of type _IntKibibytesBound_ 
that suffers from this issue. 

Now, I went ahead and did a further check for the other properties that are 
widen to long as it seems this bug was introduced when we removed the static 
methods from _DataStorageSpec._

We will need to add _toBytesInLong_ also for _IntMebibytesBound_ to cover 
_getMinFreeSpacePerDriveInBytes() /_ min_free_space_per_drive,

_compaction_large_partition_warning_threshold / 
getMinFreeSpacePerDriveInBytes(), getMaxHintsFileSize() / max_hints_file_size_
{quote}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.
{quote}
I am also not sure, I think in general config parameters tightening starts with 
4.0. From the comments on the original ticket it seems this was something in 
between improvement and bug fixing as overflowing was considered as unlikely 
but possible. 

Shall we fix all this with this ticket or spin another one? 

 

> 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: 50m
>  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]

Reply via email to