3
0
mirror of https://github.com/grafana/grafana.git synced 2025-02-25 18:55:37 -06:00
grafana/packages/grafana-data
Kristin Laemmert 50244ed4a1
Experimental Feature Toggle: databaseReadReplica ()
This adds a version of the SQLStore that includes a ReadReplica. The primary DB can be accessed directly - from the caller's standpoint, there is no difference between the SQLStore and ReplStore unless they wish to explicitly call the ReadReplica() and use that for the DB sessions.

Currently only the stats service GetSystemStats and GetAdminStats are using the ReadReplica(); if it's misconfigured or if the databaseReadReplica feature flag is not turned on, it will fall back to the usual (SQLStore) behavior.

Testing requires a database and read replica - the replication should already be configured. I have been testing this locally with a docker mysql setup (https://medium.com/@vbabak/docker-mysql-master-slave-replication-setup-2ff553fceef2) and the following config:

[feature_toggles]
databaseReadReplica = true

[database]
type = mysql
name = grafana
user = grafana
password = password
host = 127.0.0.1:3306

[database_replica]
type = mysql
name = grafana
user = grafana
password = password
host = 127.0.0.1:3307
2024-06-18 11:07:15 -04:00
..
src Experimental Feature Toggle: databaseReadReplica () 2024-06-18 11:07:15 -04:00
test DashboardScene: Share snapshot () 2023-10-11 04:24:18 -07:00
typings/jest Tempo: Return new version of dataframe schema directly from the backend () 2021-03-22 19:09:15 +01:00
.eslintrc Grafana packages: Remove E2E workspace () 2024-04-25 07:12:43 +02:00
CHANGELOG.md Prettier: Fix all markdown files and add markdown files to CI verify step () 2021-09-29 14:34:40 +02:00
LICENSE_APACHE2 Re-license Grafana to AGPLv3 () 2021-04-20 19:03:30 +02:00
package.json Release: Bump version to 11.2.0-pre () 2024-06-13 15:08:07 -05:00
README.md Changelog and Readme: Update packages to beta and add Select breaking change () 2020-05-14 11:58:26 +02:00
rollup.config.ts Revert "Update dependency rollup to v3 ()" () 2023-02-27 07:01:24 -05:00
tsconfig.build.json grafana/data: Move getPanelOptionsWithDefaults from core () 2022-12-29 05:48:22 -08:00
tsconfig.json Build: Introduce ESM and Treeshaking to NPM package builds () 2022-08-03 15:47:09 +02:00

Grafana Data Library

@grafana/data is currently in BETA.

This package holds the root data types and functions used within Grafana.