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

Michael Semb Wever commented on CASSANDRA-16071:
------------------------------------------------

I should have put this in NEWS.txt :-(

bq.  A safe bet would be to interpret anything over 100000 (100GB in MB, but 
only 100K if bytes) as bytes…

This is smart. Though I'm uneasy with continuing to interpret the value in 
bytes. 
Here are patches for 
[3.11|https://github.com/apache/cassandra/compare/cassandra-3.11...thelastpickle:mck/cassandra-3.11_16701_2]
 and 
[trunk|https://github.com/apache/cassandra/compare/trunk...thelastpickle:mck/trunk_16071_2]
 that, if the value is over 100GB, log an error and revert value back to 
default of 1GB. This won't be ideal in all situations, but I believe it means 
users will correct the configuration and will be therefore safer in the longer 
run. wdyt [~scott_carey], [~jasonstack]?


Rehashing the pain…

Clusters that had previously configured {{max_compaction_flush_memory_in_mb}} 
as bytes,  must take one of the upgrade actions,

Upgrading to 3.11.8 or 3.11.9:
- disable compactions on all nodes 
- rolling upgrade all nodes (disabling compactions upon restart)
- drop and recreate index with correct {{max_compaction_flush_memory_in_mb}} mb 
value
- enable compactions on all nodes

With the patches proposed, upgrading to 3.11.10+:
- rolling upgrade all nodes
- drop and recreate index with correct {{max_compaction_flush_memory_in_mb}} mb 
value




> max_compaction_flush_memory_in_mb is interpreted as bytes
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-16071
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16071
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Feature/SASI
>            Reporter: Michael Semb Wever
>            Assignee: Michael Semb Wever
>            Priority: Normal
>             Fix For: 4.0, 3.11.8, 4.0-beta2
>
>
> In CASSANDRA-12662, [~scottcarey] 
> [reported|https://issues.apache.org/jira/browse/CASSANDRA-12662?focusedCommentId=17070055&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17070055]
>  that the {{max_compaction_flush_memory_in_mb}} setting gets incorrectly 
> interpreted in bytes rather than megabytes as its name implies.
> {quote}
> 1.  the setting 'max_compaction_flush_memory_in_mb' is a misnomer, it is 
> actually memory in BYTES.  If you take it at face value, and set it to say, 
> '512' thinking that means 512MB,  you will produce a million temp files 
> rather quickly in a large compaction, which will exhaust even large values of 
> max_map_count rapidly, and get the OOM: Map Error issue above and possibly 
> have a very difficult situation to get a cluster back into a place where 
> nodes aren't crashing while initilaizing or soon after.  This issue is minor 
> if you know about it in advance and set the value IN BYTES.
> {quote}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to