You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ad...@apache.org on 2022/01/26 11:52:09 UTC
[cassandra] branch trunk updated (02dad36 -> ecfe7e8)
This is an automated email from the ASF dual-hosted git repository.
adelapena pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git.
from 02dad36 Merge branch 'cassandra-4.0' into trunk
new 40bf533 Fix conversion from megabits to bytes in streaming rate limiter
new bfab1fd Merge branch 'cassandra-3.0' into cassandra-3.11
new 67f913a Merge branch 'cassandra-3.11' into cassandra-4.0
new ecfe7e8 Merge branch 'cassandra-4.0' into trunk
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
CHANGES.txt | 1 +
NEWS.txt | 6 ++++++
src/java/org/apache/cassandra/streaming/StreamManager.java | 2 +-
3 files changed, 8 insertions(+), 1 deletion(-)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org
[cassandra] 01/01: Merge branch 'cassandra-4.0' into trunk
Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
adelapena pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git
commit ecfe7e809baf342b33fae1d6497f32f90c2eda18
Merge: 02dad36 67f913a
Author: Andrés de la Peña <a....@gmail.com>
AuthorDate: Wed Jan 26 11:50:33 2022 +0000
Merge branch 'cassandra-4.0' into trunk
CHANGES.txt | 1 +
NEWS.txt | 6 ++++++
src/java/org/apache/cassandra/streaming/StreamManager.java | 2 +-
3 files changed, 8 insertions(+), 1 deletion(-)
diff --cc NEWS.txt
index 560b56c,1649ccd..ff166df
--- a/NEWS.txt
+++ b/NEWS.txt
@@@ -81,20 -44,21 +81,26 @@@ New feature
Upgrading
---------
+ - Before you upgrade, if you are using `cassandra.auth_bcrypt_gensalt_log2_rounds` property,
+ confirm it is set to value lower than 31 otherwise Cassandra will fail to start. See CASSANDRA-9384
+ for further details. You also need to regenerate passwords for users for who the password
+ was created while the above property was set to be more than 30 otherwise they will not be able to log in.
+ - JNA library was updated from 5.6.0 to 5.9.0. In version 5.7.0, Darwin support for M1 devices
+ was fixed but prebuild native library for Darwin x86 (32bit Java on Mac OS) was removed.
+ - The config properties for setting the streaming throughput `stream_throughput_outbound_megabits_per_sec` and
+ `inter_dc_stream_throughput_outbound_megabits_per_sec` were incorrectly interpreted as mebibits. This has
+ been fixed by CASSANDRA-17243, so the values for these properties will now indicate a throughput ~4.6% lower than
+ what was actually applied in previous versions. This also affects the setters and getters for these properties in
+ the JMX MBean `org.apache.cassandra.db:type=StorageService` and the nodetool commands `set/getstreamthroughput`
+ and `set/getinterdcstreamthroughput`.
- - Before you upgrade, if you are using `cassandra.auth_bcrypt_gensalt_log2_rounds` property,
- confirm it is set to value lower than 31 otherwise Cassandra will fail to start. See CASSANDRA-9384
- for further details. You also need to regenerate passwords for users for who the password
- was created while the above property was set to be more than 30 otherwise they will not be able to log in.
- - As part of the Internode Messaging improvement work in CASSANDRA-15066, internode_send_buff_size_in_bytes and
- internode_recv_buff_size_in_bytes were renamed to internode_socket_send_buffer_size_in_bytes and
- internode_socket_receive_buffer_size_in_bytes. To support upgrades pre-4.0, we add backward compatibility and
- currently both old and new names should work. Cassandra 4.0.0 and Cassandra 4.0.1 work ONLY with the new names
- (They weren't updated in cassandra.yaml though).
+
+Deprecation
+-----------
+ - The properties `keyspace_count_warn_threshold` and `table_count_warn_threshold` in cassandra.yaml have been
+ deprecated in favour of the new `guardrails.keyspaces` and `guardrails.tables` properties and will be removed
+ in a subsequent major version. This also affects the setters and getters for those properties in the JMX MBean
+ `org.apache.cassandra.db:type=StorageService`, which are equally deprecated in favour of the analogous methods
+ in the JMX MBean `org.apache.cassandra.db:type=Guardrails`. See CASSANDRA-17195 for further details.
4.0
===
diff --cc src/java/org/apache/cassandra/streaming/StreamManager.java
index 8cc9494,849f7b5..59f8821
--- a/src/java/org/apache/cassandra/streaming/StreamManager.java
+++ b/src/java/org/apache/cassandra/streaming/StreamManager.java
@@@ -57,55 -58,21 +57,55 @@@ public class StreamManager implements S
*/
public static StreamRateLimiter getRateLimiter(InetAddressAndPort peer)
{
- return new StreamRateLimiter(peer);
+ return new StreamRateLimiter(peer,
+ StreamRateLimiter.LIMITER,
+ StreamRateLimiter.INTER_DC_LIMITER,
+ DatabaseDescriptor.getStreamThroughputOutboundMegabitsPerSec(),
+ DatabaseDescriptor.getInterDCStreamThroughputOutboundMegabitsPerSec());
}
- public static class StreamRateLimiter
+ /**
+ * Get streaming rate limiter for entire SSTable operations.
+ * When {@code entire_sstable_stream_throughput_outbound_megabits_per_sec}
+ * is less than or equal ot {@code 0}, this returns rate limiter with the
+ * rate of {@link Double.MAX_VALUE} bytes per second.
+ * Rate unit is bytes per sec.
+ *
+ * @param peer the peer location
+ * @return {@link StreamRateLimiter} with entire SSTable rate limit set based on peer location
+ */
+ public static StreamRateLimiter getEntireSSTableRateLimiter(InetAddressAndPort peer)
+ {
+ return new StreamRateLimiter(peer,
+ StreamRateLimiter.ENTIRE_SSTABLE_LIMITER,
+ StreamRateLimiter.ENTIRE_SSTABLE_INTER_DC_LIMITER,
+ DatabaseDescriptor.getEntireSSTableStreamThroughputOutboundMegabitsPerSec(),
+ DatabaseDescriptor.getEntireSSTableInterDCStreamThroughputOutboundMegabitsPerSec());
+ }
+
+ public static class StreamRateLimiter implements StreamingDataOutputPlus.RateLimiter
{
- public static final double BYTES_PER_MEGABIT = (1024 * 1024) / 8; // from bits
+ public static final double BYTES_PER_MEGABIT = (1000 * 1000) / 8.0;
- private static final RateLimiter limiter = RateLimiter.create(calculateRateInBytes());
- private static final RateLimiter interDCLimiter = RateLimiter.create(calculateInterDCRateInBytes());
+ private static final RateLimiter LIMITER = RateLimiter.create(calculateRateInBytes());
+ private static final RateLimiter INTER_DC_LIMITER = RateLimiter.create(calculateInterDCRateInBytes());
+ private static final RateLimiter ENTIRE_SSTABLE_LIMITER = RateLimiter.create(calculateEntireSSTableRateInBytes());
+ private static final RateLimiter ENTIRE_SSTABLE_INTER_DC_LIMITER = RateLimiter.create(calculateEntireSSTableInterDCRateInBytes());
+
+ private final RateLimiter limiter;
+ private final RateLimiter interDCLimiter;
private final boolean isLocalDC;
+ private final int throughput;
+ private final int interDCThroughput;
- public StreamRateLimiter(InetAddressAndPort peer)
+ private StreamRateLimiter(InetAddressAndPort peer, RateLimiter limiter, RateLimiter interDCLimiter, int throughput, int interDCThroughput)
{
+ this.limiter = limiter;
+ this.interDCLimiter = interDCLimiter;
+ this.throughput = throughput;
+ this.interDCThroughput = interDCThroughput;
if (DatabaseDescriptor.getLocalDataCenter() != null && DatabaseDescriptor.getEndpointSnitch() != null)
isLocalDC = DatabaseDescriptor.getLocalDataCenter().equals(
- DatabaseDescriptor.getEndpointSnitch().getDatacenter(peer));
+ DatabaseDescriptor.getEndpointSnitch().getDatacenter(peer));
else
isLocalDC = true;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org