Het team achter CockroachDB heeft twee nieuwe versies uitgebracht met 23.1.3 en 22.1.21 als de versienummers. Dit is een opensourcedatabase die uitermate geschikt is voor cloudomgevingen en die verschillende opties voor het opvangen van problemen in de bijbehorende verspreide data biedt. Voor meer informatie verwijzen we naar deze pagina, waar de meest gestelde vragen worden beantwoord. De lijst met aanpassingen van deze uitgaves ziet er als volgt uit:
What's New in v23.1.3
ChangelogSecurity updates
- View a detailed changelog on GitHub: v23.1.2...v23.1.3
Enterprise edition changes
- The new server.client_cert_expiration_cache.capacity cluster setting allows you to configure the minimum time until a user's set of client certificates will expire. When server.client_cert_expiration_cache.capacity is set to a non-zero value, the new metric security.certificate.expiration.client tracks the number of client certificates that have expired. #104165
SQL language changes
- Role-based audit logging is now an Enterprise feature. Only Enterprise users will be able to configure role-based audit logging using the sql.log.user_audit cluster setting. #104453
- The new sql.log.user_audit cluster setting enables role-based auditing. When the setting is enabled, you can set an audit logging configuration using a table-like syntax. Each row in the configuration represents an audit setting in the configuration. An audit setting is comprised of the following columns: USER/ROLE and STATEMENT_FILTER:
SET CLUSTER SETTING sql.log.user_audit = ' test_role ALL another_role NONE ALL NONE ';#104179- Introduced the sql.log.user_audit.reduced_config.enabled cluster setting. When enabled, this cluster setting computes a "reduced" audit configuration based on the user's current role memberships and the current value for the sql.log.user_audit cluster setting. The "reduced" audit configuration is computed at the first SQL event emit by the user, after the setting is enabled. When the cluster setting is enabled, CockroachDB can compute the audit configuration once at session start, which provides around a 5% increase in throughput. However, changes to the audit configuration (user role memberships or cluster setting configuration) are not reflected within a session. A new session should be started to reflect the configuration changes in auditing behavior. #104372
Operational changes
- When the sql.trace.stmt.enable_threshold or sql.trace.txn.enable_threshold cluster settings is enabled, the logging output is now emitted on the SQL_EXEC channel. Previously, this was emitted to the DEV channel. #104047
- SHOW GRANTS now lists privileges inherited by role membership. SHOW GRANTS ON ROLE statements no longer require any privileges and also lists implicit grantees. #104587
DB Console changes
- The new metric leases.liveness shows the number of liveness range leases per node to track the liveness range leaseholder. #104076
- The new a gauge metric sql.conns_waiting_to_hash counts the number of connection attempts that are being limited due to the number of concurrent password hashing operations. This behavior has been present since v21.2 to prevent password hashing from increasing CPU load. The metric is expected to be 0, or close to 0, in a healthy setup. If the metric is consistently high and connection latencies are high, then an operator should do one or more of the following:
- Ensure applications using the cluster have properly configured connection pools.
- Add more vCPU or more nodes to the cluster.
- Increase the password hashing concurrency using the COCKROACH_MAX_PW_HASH_COMPUTE_CONCURRENCY environment variable. #104388
Bug fixes
- Added merge queue failure and merge queue processing time metrics to the Queue Processing Failures and Queue Processing Times graphs respectively. #104034
- Removed the Circuit Breaker Tripped Events graph from the Replication dashboard. #104038
- Added Completed time to Jobs and Job details pages, and updated the time format on those pages to include seconds and milliseconds. #104063
- Added a Created SQL Connections chart on the SQL dashboard under Metrics. #104072
- Added Ranges in Catchup Mode and Rangefeed Catchup Scans Duration charts to the Changefeeds dashboard. #104122
- The sort setting on the Hot Ranges page is now persisted across page reloads and navigation. #104112
- The Databases page now supports a large number of tables for a single database. If more than 40 tables are present in a database, the sort on the page will be disabled; however, it is still possible to filter by table name. #103854
- On the Statement Details page, renamed the "Idle Latency" metric to "Client Wait Time" and separated it into its own chart. #103915
- Added more search criteria options on the SQL Activity page:
- For the Top dropdown: 1000, 5000, and 10000.
- For the By dropdown on the Statements tab: Last Execution Time, Max Latency, Max Memory, Min Latency, Network, P50 Latency, P90 Latency, Retries, and Rows Processed.
- For the By dropdown on the Transactions tab: Max Memory, Network, Retries, and Rows Processed. #104054
- Added a new link to the Range Status page on the Replication dashboard that opens the Enqueue Ranges page with the node ID already completed. #104100
- The DB Console will no longer show DROP INDEX recommendations for unique indexes. #104287
- On the Transactions tab of the SQL Activity page, the Status will be Idle if the executing transaction is not currently executing a statement. Previously, the status would be Executing. #103925
- Fixed the job that updates the statement_activity and transaction_activity tables on the SQL Activity page. The table size is now constrained when there are a lot of unique queries. This fix helps to prevent slowing down the SQL Activity page. #104340
Performance improvements
- Fixed a panic that could occur while a COPY statement is logged for telemetry purposes. #103848
- Fixed a bug where disk space used by deleted and garbage collected data would not be reclaimed in a timely manner, especially when a store has low-write workload. #103865
- Fixed a problem that could lead to erroneously refused lease transfers, causing the following error message: refusing to transfer lease to [...] because target may need a Raft snapshot: replica in StateProbe. #103849
- Fixed a bug where COPY in v23.1.0 and beta versions would incorrectly encode data with multiple column families. The data must be dropped and re-imported to be encoded correctly. #103393
- Fixed a bug where running a debug command that manipulates a store (e.g., debug compact) without first terminating the node using the store, could result in corruption of the node's store if encryption-at-rest was enabled. #102877
- Fixed a bug where SHOW DEFAULT PRIVILEGES did not work correctly if the database name or schema name being inspected had upper-case or special characters. #103952
- Fixed a bug that could cause queries with joins or subqueries to omit rows where column values are NULL in very rare cases. This bug was present since v20.2. #103803
- Fixed a bug that could cause goroutines to hang during SCRAM authentication. #104197
- The sys.cpu.combined.percent-normalized metric now uses GOMAXPROCS, if lower than the number of CPU shares when calculating CPU utilization. #104191
- The warning message about a missing --advertise-addr flag is no longer displayed when the flag is specified on server start. #104227
- Fixed a rare bug where stale multi-column table statistics could cause table statistics forecasts to be inaccurate, leading to un-optimal query plans. #104229
- Fixed a bug in v23.1.0 where the node_id field would be omitted from logs. The node_id value has now been restored to the logs. #103798
- Fixed a bug where the collection of KV bytes read and KV gRPC calls execution statistics during EXPLAIN ANALYZE could be incorrect (it would remain at zero) in some cases. The bug was introduced in the v23.1.0 release. #104194
- Fixed an incorrect results bug in v22.1.11 and v23.1.3 and above when the optimizer_use_improved_computed_column_filters_derivation session setting is true. Predicates on computed columns are derived when an ORed predicate on a column in the computed column expression is present. #104276
- The keyvisualizer job no longer panics if an error is encountered while cleaning up stale samples. Instead, if the job encounters an error, the job will try again later. #104374
- Fixed a bug where it was possible for a SQL row to be split across two ranges. When this occurred, SQL queries could return unexpected errors. The real keys are now inspected rather than just request keys to determine load-based split points. #103876
- Fixed a bug which could cause a panic when a CREATE FUNCTION statement used the setval() built-in function. #104297
- Fixed a rare race condition that could allow large restore jobs to fail with an unable to find store error. #100955
- Fixed a bug where CockroachDB would not ignore the messages that it should, if there was an error while in the PostgreSQL extended protocol. #104459
- Fixed a bug in which some Google Cloud Platform-related errors would be returned with an uninformative error. #104065
- Fixed a bug where in rare cases a panic could occur during shutdown in relation to the SQL activity computation. This bug was introduced in v23.1.0. #104515
- The backfill of system.job_info upgrade migration that runs during upgrades from v22.2 now processes rows in batches to avoid cases where it could become stuck due to contention and transaction retries. #104574
- Fixes a bug in which SHOW BACKUP would fail to show a locality-aware backup that contained incremental backups. #103761
What's New in v22.1.21
- If transaction_rows_read_err is set to a non-zero value, CockroachDB now ensures that any single scan never reads more than transaction_rows_read_err + 1 rows. This prevents transactions that would error due to the transaction_rows_read_err setting from causing a large performance overhead due to large scans. #104364
- Improved the efficiency of the an internal job that during upgrades deleted descriptors of dropped functions. Previously, the job would check every single ID until the max descriptor ID, which was particularly inefficient when this was large. Now, the job only queries the upper bound ID of each batch. #104590
ChangelogDB Console changes
- View a detailed changelog on GitHub: v22.1.20...v22.1.21
Bug fixes
- If a page crashes, a force refresh is no longer required to be able to see the other pages on DB Console. #103326
- On the SQL Activity > Fingerprints view, users will not see stats that have not yet been flushed to disk. #103130
- Users can now request top-k stmts by % runtime on the SQL Activity > Fingerprints view. #103130
- Added Search Criteria to the Statements and Transactions pages. #103130
- Fixed a bug in closed timestamp updates within its side-transport. Previously, during asymmetric network partitions, a node that transfers a lease away, and misses a liveness heartbeat, could then erroneously update the closed timestamp during the stasis period of its liveness. This could lead to closed timestamp invariant violation, and node crashes. In extreme cases this could lead to inconsistencies in read-only queries. #102597
- The value of pg_constraint.conparentid is now 0 rather than NULL. CockroachDB does not support constraints on partitions. #103230