HHH-15668 Apply recommended settings for CockroachDB
The recommended CockroachDB v22.1 settings for local testing have changed. The recommended settings are now applied. The setting `schemachanger.backfiller.buffer_increment` seems to have been removed (despite still being mentioned in the documentation). We remove it because it throws an error and this may leave the Cockroach cluster with some of the recommended settings not applied.
This commit is contained in:
parent
160f86a2f6
commit
be406f2732
16
docker_db.sh
16
docker_db.sh
|
@ -606,8 +606,8 @@ sinks:
|
|||
redact: false
|
||||
exit-on-error: true
|
||||
"
|
||||
$CONTAINER_CLI run -d --name=cockroach -m 3g -p 26257:26257 -p 8080:8080 docker.io/cockroachdb/cockroach:v22.1.10 start-single-node \
|
||||
--insecure --store=type=mem,size=640MiB --advertise-addr=localhost --log="$LOG_CONFIG"
|
||||
$CONTAINER_CLI run -d --name=cockroach -m 3g -p 26257:26257 -p 8080:8080 docker.io/cockroachdb/cockroach:v22.1.11 start-single-node \
|
||||
--insecure --store=type=mem,size=0.25 --advertise-addr=localhost --log="$LOG_CONFIG"
|
||||
OUTPUT=
|
||||
while [[ $OUTPUT != *"CockroachDB node starting"* ]]; do
|
||||
echo "Waiting for CockroachDB to start..."
|
||||
|
@ -616,7 +616,7 @@ sinks:
|
|||
OUTPUT=$($CONTAINER_CLI logs cockroach 2>&1)
|
||||
done
|
||||
echo "Enabling experimental box2d operators and some optimized settings for running the tests"
|
||||
#settings documented in https://www.cockroachlabs.com/docs/v21.2/local-testing.html#use-a-local-single-node-cluster-with-in-memory-storage
|
||||
#settings documented in https://www.cockroachlabs.com/docs/v22.1/local-testing.html#use-a-local-single-node-cluster-with-in-memory-storage
|
||||
$CONTAINER_CLI exec cockroach bash -c "cat <<EOF | ./cockroach sql --insecure
|
||||
SET CLUSTER SETTING sql.spatial.experimental_box2d_comparison_operators.enabled = on;
|
||||
SET CLUSTER SETTING kv.raft_log.disable_synchronization_unsafe = true;
|
||||
|
@ -624,15 +624,11 @@ SET CLUSTER SETTING kv.range_merge.queue_interval = '50ms';
|
|||
SET CLUSTER SETTING jobs.registry.interval.gc = '30s';
|
||||
SET CLUSTER SETTING jobs.registry.interval.cancel = '180s';
|
||||
SET CLUSTER SETTING jobs.retention_time = '15s';
|
||||
SET CLUSTER SETTING schemachanger.backfiller.buffer_increment = '128 KiB';
|
||||
SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false;
|
||||
SET CLUSTER SETTING kv.range_split.by_load_merge_delay = '5s';
|
||||
SET CLUSTER SETTING timeseries.storage.enabled = false;
|
||||
SET CLUSTER SETTING timeseries.storage.resolution_10s.ttl = '0s';
|
||||
SET CLUSTER SETTING timeseries.storage.resolution_30m.ttl = '0s';
|
||||
ALTER RANGE default CONFIGURE ZONE USING \"gc.ttlseconds\" = 10;
|
||||
ALTER DATABASE system CONFIGURE ZONE USING \"gc.ttlseconds\" = 10;
|
||||
ALTER DATABASE defaultdb CONFIGURE ZONE USING \"gc.ttlseconds\" = 10;
|
||||
ALTER RANGE default CONFIGURE ZONE USING "gc.ttlseconds" = 600;
|
||||
ALTER DATABASE system CONFIGURE ZONE USING "gc.ttlseconds" = 600;
|
||||
|
||||
quit
|
||||
EOF
|
||||
"
|
||||
|
|
Loading…
Reference in New Issue