ekaterinadimitrova2 commented on a change in pull request #1425:
URL: https://github.com/apache/cassandra/pull/1425#discussion_r795297920



##########
File path: src/java/org/apache/cassandra/config/Config.java
##########
@@ -261,96 +300,119 @@
 
     // Commit Log
     public String commitlog_directory;
-    public Integer commitlog_total_space_in_mb;
+    @Replaces(oldName = "commitlog_total_space_in_mb", converter = 
Converters.MEBIBYTES_DATA_STORAGE, deprecated = true)
+    public DataStorageSpec commitlog_total_space;
     public CommitLogSync commitlog_sync;
 
     /**
      * @deprecated since 4.0 This value was near useless, and we're not using 
it anymore
      */
     public double commitlog_sync_batch_window_in_ms = Double.NaN;
-    public double commitlog_sync_group_window_in_ms = Double.NaN;
-    public int commitlog_sync_period_in_ms;
-    public int commitlog_segment_size_in_mb = 32;
+    @Replaces(oldName = "commitlog_sync_group_window_in_ms", converter = 
Converters.MILLIS_DOUBLE_DURATION, deprecated = true)
+    public DurationSpec commitlog_sync_group_window = new DurationSpec("0ms");
+    @Replaces(oldName = "commitlog_sync_period_in_ms", converter = 
Converters.MILLIS_DURATION, deprecated = true)
+    public DurationSpec commitlog_sync_period = new DurationSpec("0ms");
+    @Replaces(oldName = "commitlog_segment_size_in_mb", converter = 
Converters.MEBIBYTES_DATA_STORAGE, deprecated = true)
+    public DataStorageSpec commitlog_segment_size = new 
DataStorageSpec("32MiB");
+
     public ParameterizedClass commitlog_compression;
     public FlushCompression flush_compression = FlushCompression.fast;
     public int commitlog_max_compression_buffers_in_pool = 3;
-    public Integer periodic_commitlog_sync_lag_block_in_ms;
+    @Replaces(oldName = "periodic_commitlog_sync_lag_block_in_ms", converter = 
Converters.MILLIS_DURATION, deprecated = true)
+    public DurationSpec periodic_commitlog_sync_lag_block;
     public TransparentDataEncryptionOptions 
transparent_data_encryption_options = new TransparentDataEncryptionOptions();
 
-    public Integer max_mutation_size_in_kb;
+    @Replaces(oldName = "max_mutation_size_in_kb", converter = 
Converters.KIBIBYTES_DATASTORAGE, deprecated = true)
+    public DataStorageSpec max_mutation_size;
 
     // Change-data-capture logs
     public boolean cdc_enabled = false;
     // When true, new CDC mutations are rejected/blocked when reaching max CDC 
storage.
     // When false, new CDC mutations can always be added. But it will remove 
the oldest CDC commit log segment on full.
     public volatile boolean cdc_block_writes = true;
     public String cdc_raw_directory;
-    public int cdc_total_space_in_mb = 0;
-    public int cdc_free_space_check_interval_ms = 250;
+    @Replaces(oldName = "cdc_total_space_in_mb", converter = 
Converters.MEBIBYTES_DATA_STORAGE, deprecated = true)
+    public DataStorageSpec cdc_total_space = new DataStorageSpec("0MiB");
+    @Replaces(oldName = "cdc_free_space_check_interval_ms", converter = 
Converters.MILLIS_DURATION, deprecated = true)
+    public DurationSpec cdc_free_space_check_interval = new 
DurationSpec("250ms");
 
     @Deprecated
     public int commitlog_periodic_queue_size = -1;
 
     public String endpoint_snitch;
     public boolean dynamic_snitch = true;
-    public int dynamic_snitch_update_interval_in_ms = 100;
-    public int dynamic_snitch_reset_interval_in_ms = 600000;
+    @Replaces(oldName = "dynamic_snitch_update_interval_in_ms", converter = 
Converters.MILLIS_DURATION, deprecated = true)
+    public DurationSpec dynamic_snitch_update_interval = new 
DurationSpec("100ms");
+    @Replaces(oldName = "dynamic_snitch_reset_interval_in_ms", converter = 
Converters.MILLIS_DURATION, deprecated = true)
+    public DurationSpec dynamic_snitch_reset_interval = new 
DurationSpec("10m");
     public double dynamic_snitch_badness_threshold = 1.0;
-
+    
     public String failure_detector = "FailureDetector";
 
     public EncryptionOptions.ServerEncryptionOptions server_encryption_options 
= new EncryptionOptions.ServerEncryptionOptions();
     public EncryptionOptions client_encryption_options = new 
EncryptionOptions();
 
     public InternodeCompression internode_compression = 
InternodeCompression.none;
 
-    public int hinted_handoff_throttle_in_kb = 1024;
-    public int batchlog_replay_throttle_in_kb = 1024;
+    @Replaces(oldName = "hinted_handoff_throttle_in_kb", converter = 
Converters.KIBIBYTES_DATASTORAGE, deprecated = true)
+    public volatile DataStorageSpec hinted_handoff_throttle = new 
DataStorageSpec("1024KiB");
+    @Replaces(oldName = "batchlog_replay_throttle_in_kb", converter = 
Converters.KIBIBYTES_DATASTORAGE, deprecated = true)
+    public volatile DataStorageSpec batchlog_replay_throttle = new 
DataStorageSpec("1024KiB");
     public int max_hints_delivery_threads = 2;
-    public int hints_flush_period_in_ms = 10000;
-    public int max_hints_file_size_in_mb = 128;
+    @Replaces(oldName = "hints_flush_period_in_ms", converter = 
Converters.MILLIS_DURATION, deprecated = true)
+    public DurationSpec hints_flush_period = new DurationSpec("10s");
+    @Replaces(oldName = "max_hints_file_size_in_mb", converter = 
Converters.MEBIBYTES_DATA_STORAGE, deprecated = true)
+    public DataStorageSpec max_hints_file_size = new DataStorageSpec("128MiB");
     public ParameterizedClass hints_compression;
     public volatile boolean auto_hints_cleanup_enabled = false;
 
     public volatile boolean incremental_backups = false;
     public boolean trickle_fsync = false;
-    public int trickle_fsync_interval_in_kb = 10240;
+    @Replaces(oldName = "trickle_fsync_interval_in_kb", converter = 
Converters.KIBIBYTES_DATASTORAGE, deprecated = true)
+    public DataStorageSpec trickle_fsync_interval = new 
DataStorageSpec("10240KiB");
 
-    public volatile int sstable_preemptive_open_interval_in_mb = 50;
+    @Replaces(oldName = "sstable_preemptive_open_interval_in_mb", converter = 
Converters.MEBIBYTES_DATA_STORAGE, deprecated = true)
+    public volatile DataStorageSpec sstable_preemptive_open_interval = new 
DataStorageSpec("50MiB");
 
     public volatile boolean key_cache_migrate_during_compaction = true;
-    public Long key_cache_size_in_mb = null;
-    public volatile int key_cache_save_period = 14400;
+    @Replaces(oldName = "key_cache_size_in_mb", converter = 
Converters.MEBIBYTES_DATA_STORAGE, deprecated = true)
+    public DataStorageSpec key_cache_size = null;
+    @Replaces(oldName = "key_cache_save_period", converter = 
Converters.SECONDS_CUSTOM_DURATION, deprecated = true)
+    public volatile DurationSpec key_cache_save_period = new 
DurationSpec("4h");
     public volatile int key_cache_keys_to_save = Integer.MAX_VALUE;
 
     public String row_cache_class_name = 
"org.apache.cassandra.cache.OHCProvider";
-    public long row_cache_size_in_mb = 0;
-    public volatile int row_cache_save_period = 0;
+    @Replaces(oldName = "row_cache_size_in_mb", converter = 
Converters.MEBIBYTES_DATA_STORAGE, deprecated = true)
+    public volatile DataStorageSpec row_cache_size = new 
DataStorageSpec("0MiB");

Review comment:
       no need of volatile again




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to