mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-4.1' into trunk
This commit is contained in:
commit
d0e566a953
|
|
@ -5,4 +5,6 @@
|
|||
sstable_preemptive_open_interval_in_mb: -1
|
||||
index_summary_resize_interval_in_minutes: -1
|
||||
cache_load_timeout_seconds: -1
|
||||
commitlog_sync_group_window_in_ms: NaN
|
||||
credentials_update_interval_in_ms: -1
|
||||
|
||||
|
|
|
|||
|
|
@ -5,4 +5,6 @@
|
|||
sstable_preemptive_open_interval:
|
||||
index_summary_resize_interval:
|
||||
cache_load_timeout: 0s
|
||||
commitlog_sync_group_window: 0ms
|
||||
credentials_update_interval:
|
||||
|
||||
|
|
|
|||
|
|
@ -131,21 +131,25 @@ public class YamlConfigurationLoaderTest
|
|||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("sstable_preemptive_open_interval", null);
|
||||
map.put("index_summary_resize_interval", null);
|
||||
map.put("credentials_update_interval", null);
|
||||
|
||||
Config c = YamlConfigurationLoader.fromMap(map, true, Config.class);
|
||||
assertThat(c.sstable_preemptive_open_interval).isNull();
|
||||
assertThat(c.index_summary_resize_interval).isNull();
|
||||
assertThat(c.credentials_update_interval).isNull();
|
||||
|
||||
map = ImmutableMap.of(
|
||||
"sstable_preemptive_open_interval_in_mb", "-1",
|
||||
"index_summary_resize_interval_in_minutes", "-1",
|
||||
"cache_load_timeout_seconds", "-1"
|
||||
"cache_load_timeout_seconds", "-1",
|
||||
"credentials_update_interval_in_ms", "-1"
|
||||
);
|
||||
c = YamlConfigurationLoader.fromMap(map, Config.class);
|
||||
|
||||
assertThat(c.sstable_preemptive_open_interval).isNull();
|
||||
assertThat(c.index_summary_resize_interval).isNull();
|
||||
assertThat(c.cache_load_timeout).isEqualTo(new DurationSpec.IntSecondsBound("0s"));
|
||||
assertThat(c.credentials_update_interval).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -60,6 +60,8 @@ public class SettingsTableTest extends CQLTester
|
|||
config.sstable_preemptive_open_interval = null;
|
||||
config.index_summary_resize_interval = null;
|
||||
config.cache_load_timeout = new DurationSpec.IntSecondsBound(0);
|
||||
config.commitlog_sync_group_window = new DurationSpec.IntMillisecondsBound(0);
|
||||
config.credentials_update_interval = null;
|
||||
table = new SettingsTable(KS_NAME, config);
|
||||
VirtualKeyspaceRegistry.instance.register(new VirtualKeyspace(KS_NAME, ImmutableList.of(table)));
|
||||
disablePreparedReuseForTest();
|
||||
|
|
@ -130,6 +132,18 @@ public class SettingsTableTest extends CQLTester
|
|||
assertRowsNet(executeNet(q), new Object[] {"cache_load_timeout", "0s"});
|
||||
q = "SELECT * FROM vts.settings WHERE name = 'cache_load_timeout_seconds';";
|
||||
assertRowsNet(executeNet(q), new Object[] {"cache_load_timeout_seconds", "0"});
|
||||
|
||||
// test MILLIS_DURATION_DOUBLE converter
|
||||
q = "SELECT * FROM vts.settings WHERE name = 'commitlog_sync_group_window';";
|
||||
assertRowsNet(executeNet(q), new Object[] {"commitlog_sync_group_window", "0ms"});
|
||||
q = "SELECT * FROM vts.settings WHERE name = 'commitlog_sync_group_window_in_ms';";
|
||||
assertRowsNet(executeNet(q), new Object[] {"commitlog_sync_group_window_in_ms", "0.0"});
|
||||
|
||||
//test MILLIS_CUSTOM_DURATION converter
|
||||
q = "SELECT * FROM vts.settings WHERE name = 'credentials_update_interval';";
|
||||
assertRowsNet(executeNet(q), new Object[] {"credentials_update_interval", null});
|
||||
q = "SELECT * FROM vts.settings WHERE name = 'credentials_update_interval_in_ms';";
|
||||
assertRowsNet(executeNet(q), new Object[] {"credentials_update_interval_in_ms", "-1"});
|
||||
}
|
||||
|
||||
private String getValue(Property prop)
|
||||
|
|
|
|||
Loading…
Reference in New Issue