From 7fb2428ce5642db6919663afc773647c610b5886 Mon Sep 17 00:00:00 2001 From: Sean Roberts Date: Mon, 28 Oct 2024 10:12:44 -0400 Subject: [PATCH] docs: persistence.md (consistent name for postgresql) Minor docs fixes. Made consistent naming, as it was postgres in some places and postgresql in others. The full name helps with finding in searches. And fixing cases from PostgresQL to PostgreSQL. --- docs/persistence.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/persistence.md b/docs/persistence.md index f2188959560..600ce7a1154 100644 --- a/docs/persistence.md +++ b/docs/persistence.md @@ -1,8 +1,8 @@ # Overview Cadence has a well defined API interface at the persistence layer. Any database that supports multi-row transactions on a single shard or partition can be made to work with cadence. This includes cassandra, dynamoDB, auroraDB, MySQL, -Postgres and may others. There are currently three supported database implementations at the persistence layer - -cassandra and MySQL/Postgres. This doc shows how to run cadence with cassandra and MySQL(Postgres is mostly the same). It also describes the steps involved +PostgreSQL and may others. There are currently three supported database implementations at the persistence layer - +cassandra and MySQL/PostgreSQL. This doc shows how to run cadence with cassandra and MySQL(PostgreSQL is mostly the same). It also describes the steps involved in adding support for a new database at the persistence layer. # Getting started on mac @@ -50,8 +50,8 @@ cp config/development_mysql.yaml config/development.yaml ./cadence-server start --services=frontend,matching,history,worker ``` -## PostgresQL -### Start PostgresQL server +## PostgreSQL +### Start PostgreSQL server ``` brew install postgres brew services start postgres @@ -59,7 +59,8 @@ brew services start postgres When run tests and CLI command locally, Cadence by default uses a superuser `postgres` with password `cadence`. You can use the following command to create user(role) and grant access: ``` -$psql postgres +psql postgres + postgres=# CREATE USER postgres WITH PASSWORD 'cadence'; CREATE ROLE postgres=# ALTER USER postgres WITH SUPERUSER; @@ -130,8 +131,8 @@ persistence: maxConns: 2 -- Number of tcp conns to cassandra server (single sub-system on one host) (optional) ``` -## MySQL/Postgres -The default isolation level for MySQL/Postgres is READ-COMMITTED. +## MySQL/PostgreSQL +The default isolation level for MySQL/PostgreSQL is READ-COMMITTED. Note that for MySQL 5.6 and below only, the isolation level needs to be specified explicitly in the config via connectAttributes. @@ -155,7 +156,7 @@ persistence: tx_isolation: "READ-COMMITTED" -- required only for mysql 5.6 and below, optional otherwise ``` -## Multiple SQL(MySQL/Postgres) databases +## Multiple SQL(MySQL/PostgreSQL) databases To run Cadence clusters in a much larger scale using SQL database, multiple databases can be used as a sharded SQL database cluster. Set `useMultipleDatabases` to `true` and specify all databases' user/password/address using `multipleDatabasesConfig`: @@ -212,7 +213,7 @@ It's basically a CRUD API for every table in the schema. A sample schema definit can be found [here](https://github.com/uber/cadence/blob/master/schema/mysql/v8/cadence/schema.sql) Any database that supports this interface can be plugged in with cadence server. -We have implemented Postgres within the repo, and also here is [**an example**](https://github.com/longquanzheng/cadence-extensions/tree/master/cadence-sqlite) to implement any database externally. +We have implemented PostgreSQL within the repo, and also here is [**an example**](https://github.com/longquanzheng/cadence-extensions/tree/master/cadence-sqlite) to implement any database externally. ## For other Non-SQL Database @@ -222,4 +223,4 @@ Cadence requires at least supporting: 2. Strong consistency Read/Write operations This NoSQL persistence API interface can be found [here](https://github.com/uber/cadence/blob/master/common/persistence/nosql/nosqlplugin/interfaces.go). -Currently this is only implemented with Cassandra. DynamoDB and MongoDB are in progress. \ No newline at end of file +Currently this is only implemented with Cassandra. DynamoDB and MongoDB are in progress.