This is an automated email from the ASF dual-hosted git repository. smiklosovic pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/cassandra.git
commit c7260399d65dd84936a3ca85586b20a6b7ef009d Merge: a55d4183f5 2b98d487d0 Author: Stefan Miklosovic <[email protected]> AuthorDate: Thu Jun 15 13:23:47 2023 +0200 Merge branch 'cassandra-4.1' into trunk CHANGES.txt | 1 + .../config/CassandraRelevantProperties.java | 16 +++++++ src/java/org/apache/cassandra/gms/Gossiper.java | 55 +++++++++++++++++++--- 3 files changed, 65 insertions(+), 7 deletions(-) diff --cc src/java/org/apache/cassandra/config/CassandraRelevantProperties.java index 8eaaa7a9e0,23f9598964..fbb20766fa --- a/src/java/org/apache/cassandra/config/CassandraRelevantProperties.java +++ b/src/java/org/apache/cassandra/config/CassandraRelevantProperties.java @@@ -161,153 -120,77 +161,169 @@@ public enum CassandraRelevantPropertie * This property indicates whether SSL client authentication is enabled - com.sun.management.jmxremote.ssl.need.client.auth. * Default is set to false. */ - COM_SUN_MANAGEMENT_JMXREMOTE_SSL_NEED_CLIENT_AUTH ("com.sun.management.jmxremote.ssl.need.client.auth"), - + COM_SUN_MANAGEMENT_JMXREMOTE_SSL_NEED_CLIENT_AUTH("com.sun.management.jmxremote.ssl.need.client.auth"), + /** Defaults to false for 4.1 but plan to switch to true in a later release the thinking is that environments + * may not work right off the bat so safer to add this feature disabled by default */ + CONFIG_ALLOW_SYSTEM_PROPERTIES("cassandra.config.allow_system_properties"), + CONFIG_LOADER("cassandra.config.loader"), + CONSISTENT_DIRECTORY_LISTINGS("cassandra.consistent_directory_listings"), + CONSISTENT_RANGE_MOVEMENT("cassandra.consistent.rangemovement", "true"), + CONSISTENT_SIMULTANEOUS_MOVES_ALLOW("cassandra.consistent.simultaneousmoves.allow"), + CUSTOM_GUARDRAILS_CONFIG_PROVIDER_CLASS("cassandra.custom_guardrails_config_provider_class"), + CUSTOM_QUERY_HANDLER_CLASS("cassandra.custom_query_handler_class"), + CUSTOM_TRACING_CLASS("cassandra.custom_tracing_class"), + /** Controls the type of bufffer (heap/direct) used for shared scratch buffers */ + DATA_OUTPUT_BUFFER_ALLOCATE_TYPE("cassandra.dob.allocate_type"), + DATA_OUTPUT_STREAM_PLUS_TEMP_BUFFER_SIZE("cassandra.data_output_stream_plus_temp_buffer_size", "8192"), + DECAYING_ESTIMATED_HISTOGRAM_RESERVOIR_STRIPE_COUNT("cassandra.dehr_stripe_count", "2"), + DEFAULT_PROVIDE_OVERLAPPING_TOMBSTONES("default.provide.overlapping.tombstones"), + /** determinism properties for testing */ + DETERMINISM_SSTABLE_COMPRESSION_DEFAULT("cassandra.sstable_compression_default", "true"), + DETERMINISM_UNSAFE_UUID_NODE("cassandra.unsafe.deterministicuuidnode"), + DIAGNOSTIC_SNAPSHOT_INTERVAL_NANOS("cassandra.diagnostic_snapshot_interval_nanos", "60000000000"), + DISABLE_AUTH_CACHES_REMOTE_CONFIGURATION("cassandra.disable_auth_caches_remote_configuration"), + /** properties to disable certain behaviours for testing */ + DISABLE_GOSSIP_ENDPOINT_REMOVAL("cassandra.gossip.disable_endpoint_removal"), + DISABLE_PAXOS_AUTO_REPAIRS("cassandra.disable_paxos_auto_repairs"), + DISABLE_PAXOS_STATE_FLUSH("cassandra.disable_paxos_state_flush"), + DISABLE_SSTABLE_ACTIVITY_TRACKING("cassandra.sstable_activity_tracking", "true"), + DISABLE_STCS_IN_L0("cassandra.disable_stcs_in_l0"), + DISABLE_TCACTIVE_OPENSSL("cassandra.disable_tcactive_openssl"), + /** property for the rate of the scheduled task that monitors disk usage */ + DISK_USAGE_MONITOR_INTERVAL_MS("cassandra.disk_usage.monitor_interval_ms", convertToString(TimeUnit.SECONDS.toMillis(30))), + /** property for the interval on which the repeated client warnings and diagnostic events about disk usage are ignored */ + DISK_USAGE_NOTIFY_INTERVAL_MS("cassandra.disk_usage.notify_interval_ms", convertToString(TimeUnit.MINUTES.toMillis(30))), + DOB_DOUBLING_THRESHOLD_MB("cassandra.DOB_DOUBLING_THRESHOLD_MB", "64"), + DOB_MAX_RECYCLE_BYTES("cassandra.dob_max_recycle_bytes", convertToString(1024 * 1024)), /** - * This property indicates the location for the access file. If com.sun.management.jmxremote.authenticate is false, - * then this property and the password and access files, are ignored. Otherwise, the access file must exist and - * be in the valid format. If the access file is empty or nonexistent, then no access is allowed. + * When draining, how long to wait for mutating executors to shutdown. */ - COM_SUN_MANAGEMENT_JMXREMOTE_ACCESS_FILE ("com.sun.management.jmxremote.access.file"), - - /** This property indicates the path to the password file - com.sun.management.jmxremote.password.file */ - COM_SUN_MANAGEMENT_JMXREMOTE_PASSWORD_FILE ("com.sun.management.jmxremote.password.file"), - - /** Port number to enable JMX RMI connections - com.sun.management.jmxremote.port */ - COM_SUN_MANAGEMENT_JMXREMOTE_PORT ("com.sun.management.jmxremote.port"), - + DRAIN_EXECUTOR_TIMEOUT_MS("cassandra.drain_executor_timeout_ms", convertToString(TimeUnit.MINUTES.toMillis(5))), + DROP_OVERSIZED_READ_REPAIR_MUTATIONS("cassandra.drop_oversized_readrepair_mutations"), + DTEST_API_LOG_TOPOLOGY("cassandra.dtest.api.log.topology"), + /** This property indicates if the code is running under the in-jvm dtest framework */ + DTEST_IS_IN_JVM_DTEST("org.apache.cassandra.dtest.is_in_jvm_dtest"), + ENABLE_DC_LOCAL_COMMIT("cassandra.enable_dc_local_commit", "true"), /** - * A comma-delimited list of SSL/TLS protocol versions to enable. - * Used in conjunction with com.sun.management.jmxremote.ssl - com.sun.management.jmxremote.ssl.enabled.protocols + * Whether {@link org.apache.cassandra.db.ConsistencyLevel#NODE_LOCAL} should be allowed. */ - COM_SUN_MANAGEMENT_JMXREMOTE_SSL_ENABLED_PROTOCOLS ("com.sun.management.jmxremote.ssl.enabled.protocols"), - + ENABLE_NODELOCAL_QUERIES("cassandra.enable_nodelocal_queries"), + EXPIRATION_DATE_OVERFLOW_POLICY("cassandra.expiration_date_overflow_policy"), + EXPIRATION_OVERFLOW_WARNING_INTERVAL_MINUTES("cassandra.expiration_overflow_warning_interval_minutes", "5"), + FAILURE_LOGGING_INTERVAL_SECONDS("cassandra.request_failure_log_interval_seconds", "60"), + FD_INITIAL_VALUE_MS("cassandra.fd_initial_value_ms"), + FD_MAX_INTERVAL_MS("cassandra.fd_max_interval_ms"), + FILE_CACHE_ENABLED("cassandra.file_cache_enabled"), + /** @deprecated should be removed in favor of enable flag of relevant startup check (FileSystemOwnershipCheck) */ + @Deprecated + FILE_SYSTEM_CHECK_ENABLE("cassandra.enable_fs_ownership_check"), + /** @deprecated should be removed in favor of flags in relevant startup check (FileSystemOwnershipCheck) */ + @Deprecated + FILE_SYSTEM_CHECK_OWNERSHIP_FILENAME("cassandra.fs_ownership_filename", FileSystemOwnershipCheck.DEFAULT_FS_OWNERSHIP_FILENAME), + /** @deprecated should be removed in favor of flags in relevant startup check (FileSystemOwnershipCheck) */ + @Deprecated + FILE_SYSTEM_CHECK_OWNERSHIP_TOKEN(FileSystemOwnershipCheck.FILE_SYSTEM_CHECK_OWNERSHIP_TOKEN), + FORCE_DEFAULT_INDEXING_PAGE_SIZE("cassandra.force_default_indexing_page_size"), + /** Used when running in Client mode and the system and schema keyspaces need to be initialized outside of their normal initialization path **/ + FORCE_LOAD_LOCAL_KEYSPACES("cassandra.schema.force_load_local_keyspaces"), + FORCE_PAXOS_STATE_REBUILD("cassandra.force_paxos_state_rebuild"), + GIT_SHA("cassandra.gitSHA"), /** - * A comma-delimited list of SSL/TLS cipher suites to enable. - * Used in conjunction with com.sun.management.jmxremote.ssl - com.sun.management.jmxremote.ssl.enabled.cipher.suites + * Gossip quarantine delay is used while evaluating membership changes and should only be changed with extreme care. */ - COM_SUN_MANAGEMENT_JMXREMOTE_SSL_ENABLED_CIPHER_SUITES ("com.sun.management.jmxremote.ssl.enabled.cipher.suites"), - - /** mx4jaddress */ - MX4JADDRESS ("mx4jaddress"), - - /** mx4jport */ - MX4JPORT ("mx4jport"), - - RING_DELAY("cassandra.ring_delay_ms"), + GOSSIPER_QUARANTINE_DELAY("cassandra.gossip_quarantine_delay_ms"), + GOSSIPER_SKIP_WAITING_TO_SETTLE("cassandra.skip_wait_for_gossip_to_settle", "-1"), + GOSSIP_DISABLE_THREAD_VALIDATION("cassandra.gossip.disable_thread_validation"), + + /** - * When bootstraping we wait for all schema versions found in gossip to be seen, and if not seen in time we fail - * the bootstrap; this property will avoid failing and allow bootstrap to continue if set to true. ++ * Delay before checking if gossip is settled. + */ - BOOTSTRAP_SKIP_SCHEMA_CHECK("cassandra.skip_schema_check"), ++ GOSSIP_SETTLE_MIN_WAIT_MS("cassandra.gossip_settle_min_wait_ms", "5000"), + + /** - * When bootstraping how long to wait for schema versions to be seen. ++ * Interval delay between checking gossip is settled. + */ - BOOTSTRAP_SCHEMA_DELAY_MS("cassandra.schema_delay_ms"), ++ GOSSIP_SETTLE_POLL_INTERVAL_MS("cassandra.gossip_settle_interval_ms", "1000"), + + /** - * When draining, how long to wait for mutating executors to shutdown. ++ * Number of polls without gossip state change to consider gossip as settled. + */ - DRAIN_EXECUTOR_TIMEOUT_MS("cassandra.drain_executor_timeout_ms", String.valueOf(TimeUnit.MINUTES.toMillis(5))), ++ GOSSIP_SETTLE_POLL_SUCCESSES_REQUIRED("cassandra.gossip_settle_poll_success_required", "3"), + + IGNORED_SCHEMA_CHECK_ENDPOINTS("cassandra.skip_schema_check_for_endpoints"), + IGNORED_SCHEMA_CHECK_VERSIONS("cassandra.skip_schema_check_for_versions"), + IGNORE_CORRUPTED_SCHEMA_TABLES("cassandra.ignore_corrupted_schema_tables"), + /** @deprecated should be removed in favor of enable flag of relevant startup check (checkDatacenter) */ + @Deprecated + IGNORE_DC("cassandra.ignore_dc"), + IGNORE_DYNAMIC_SNITCH_SEVERITY("cassandra.ignore_dynamic_snitch_severity"), + IGNORE_MISSING_NATIVE_FILE_HINTS("cassandra.require_native_file_hints"), + /** @deprecated should be removed in favor of enable flag of relevant startup check (checkRack) */ + @Deprecated + IGNORE_RACK("cassandra.ignore_rack"), + INDEX_SUMMARY_EXPECTED_KEY_SIZE("cassandra.index_summary_expected_key_size", "64"), + INITIAL_TOKEN("cassandra.initial_token"), + INTERNODE_EVENT_THREADS("cassandra.internode-event-threads"), + IO_NETTY_EVENTLOOP_THREADS("io.netty.eventLoopThreads"), + IO_NETTY_TRANSPORT_ESTIMATE_SIZE_ON_SUBMIT("io.netty.transport.estimateSizeOnSubmit"), + JAVAX_RMI_SSL_CLIENT_ENABLED_CIPHER_SUITES("javax.rmi.ssl.client.enabledCipherSuites"), + JAVAX_RMI_SSL_CLIENT_ENABLED_PROTOCOLS("javax.rmi.ssl.client.enabledProtocols"), + /** Java class path. */ + JAVA_CLASS_PATH("java.class.path"), + JAVA_HOME("java.home"), /** - * Gossip quarantine delay is used while evaluating membership changes and should only be changed with extreme care. + * Indicates the temporary directory used by the Java Virtual Machine (JVM) + * to create and store temporary files. */ - GOSSIPER_QUARANTINE_DELAY("cassandra.gossip_quarantine_delay_ms"), - - GOSSIPER_SKIP_WAITING_TO_SETTLE("cassandra.skip_wait_for_gossip_to_settle", "-1"), - - IGNORED_SCHEMA_CHECK_VERSIONS("cassandra.skip_schema_check_for_versions"), - - IGNORED_SCHEMA_CHECK_ENDPOINTS("cassandra.skip_schema_check_for_endpoints"), - - SHUTDOWN_ANNOUNCE_DELAY_IN_MS("cassandra.shutdown_announce_in_ms", "2000"), - + JAVA_IO_TMPDIR("java.io.tmpdir"), /** - * When doing a host replacement its possible that the gossip state is "empty" meaning that the endpoint is known - * but the current state isn't known. If the host replacement is needed to repair this state, this property must - * be true. + * Path from which to load native libraries. + * Default is absolute path to lib directory. */ - REPLACEMENT_ALLOW_EMPTY("cassandra.allow_empty_replace_address", "true"), - + JAVA_LIBRARY_PATH("java.library.path"), + /** + * Controls the distributed garbage collector lease time for JMX objects. + * Should only be set by in-jvm dtests. + */ + JAVA_RMI_DGC_LEASE_VALUE_IN_JVM_DTEST("java.rmi.dgc.leaseValue"), + /** + * The value of this property represents the host name string + * that should be associated with remote stubs for locally created remote objects, + * in order to allow clients to invoke methods on the remote object. + */ + JAVA_RMI_SERVER_HOSTNAME("java.rmi.server.hostname"), + /** + * If this value is true, object identifiers for remote objects exported by this VM will be generated by using + * a cryptographically secure random number generator. The default value is false. + */ + JAVA_RMI_SERVER_RANDOM_ID("java.rmi.server.randomIDs"), + JAVA_SECURITY_AUTH_LOGIN_CONFIG("java.security.auth.login.config"), + JAVA_SECURITY_EGD("java.security.egd"), + /** Java Runtime Environment version */ + JAVA_VERSION("java.version"), + /** Java Virtual Machine implementation name */ + JAVA_VM_NAME("java.vm.name"), + JOIN_RING("cassandra.join_ring", "true"), + /** + * {@link StorageCompatibilityMode} mode sets how the node will behave, sstable or messaging versions to use etc according to a yaml setting. + * But many tests don't load the config hence we need to force it otherwise they would run always under the default. Config is null for junits + * that don't load the config. Get from env var that CI/build.xml sets. + * + * This is a dev/CI only property. Do not use otherwise. + */ + JUNIT_STORAGE_COMPATIBILITY_MODE("cassandra.junit_storage_compatibility_mode", StorageCompatibilityMode.CASSANDRA_4.toString()), + /** startup checks properties */ + LIBJEMALLOC("cassandra.libjemalloc"), + /** Line separator ("\n" on UNIX). */ + LINE_SEPARATOR("line.separator"), + /** Load persistence ring state. Default value is {@code true}. */ + LOAD_RING_STATE("cassandra.load_ring_state", "true"), + LOG4J2_DISABLE_JMX("log4j2.disableJmx"), + LOG4J2_DISABLE_JMX_LEGACY("log4j2.disable.jmx"), + LOG4J_SHUTDOWN_HOOK_ENABLED("log4j.shutdownHookEnabled"), + LOGBACK_CONFIGURATION_FILE("logback.configurationFile"), + /** Maximum number of rows in system_views.logs table */ + LOGS_VIRTUAL_TABLE_MAX_ROWS("cassandra.virtual.logs.max.rows", convertToString(LogMessagesTable.LOGS_VIRTUAL_TABLE_DEFAULT_ROWS)), /** * Directory where Cassandra puts its logs, defaults to "." which is current directory. */ diff --cc src/java/org/apache/cassandra/gms/Gossiper.java index adff044420,64603f92c8..dd6605cca7 --- a/src/java/org/apache/cassandra/gms/Gossiper.java +++ b/src/java/org/apache/cassandra/gms/Gossiper.java @@@ -51,26 -39,18 +51,28 @@@ import com.google.common.annotations.Vi import com.google.common.base.Throwables; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import com.google.common.collect.Iterables; import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Iterables; import com.google.common.collect.Sets; import com.google.common.util.concurrent.Uninterruptibles; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import org.apache.cassandra.concurrent.*; import org.apache.cassandra.concurrent.FutureTask; +import org.apache.cassandra.concurrent.ScheduledExecutorPlus; +import org.apache.cassandra.concurrent.Stage; + import org.apache.cassandra.config.CassandraRelevantProperties; +import org.apache.cassandra.config.DatabaseDescriptor; +import org.apache.cassandra.db.SystemKeyspace; +import org.apache.cassandra.dht.Token; + import org.apache.cassandra.exceptions.RequestFailureReason; import org.apache.cassandra.locator.InetAddressAndPort; +import org.apache.cassandra.net.Message; +import org.apache.cassandra.net.MessagingService; import org.apache.cassandra.net.NoPayload; +import org.apache.cassandra.net.RequestCallback; import org.apache.cassandra.net.Verb; +import org.apache.cassandra.service.StorageService; import org.apache.cassandra.utils.CassandraVersion; import org.apache.cassandra.utils.ExecutorUtils; import org.apache.cassandra.utils.ExpiringMemoizingSupplier; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
