summaryrefslogtreecommitdiffstats
path: root/src/lib/database/database.dox
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2020-07-01 15:21:30 +0200
committerFrancis Dupont <fdupont@isc.org>2020-07-03 19:10:39 +0200
commite183d8b7d5d9766fd7855c2507f354c153aa452b (patch)
treea4307ffb911ff723c7c9d52b97eefecb80094d3b /src/lib/database/database.dox
parent[#1258] Fixed ha-servers -> high-availability (diff)
downloadkea-e183d8b7d5d9766fd7855c2507f354c153aa452b.tar.xz
kea-e183d8b7d5d9766fd7855c2507f354c153aa452b.zip
[#996] Added MT considerations
Diffstat (limited to 'src/lib/database/database.dox')
-rw-r--r--src/lib/database/database.dox25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/lib/database/database.dox b/src/lib/database/database.dox
new file mode 100644
index 0000000000..57d2fd7dc4
--- /dev/null
+++ b/src/lib/database/database.dox
@@ -0,0 +1,25 @@
+// Copyright (C) 2020 Internet Systems Consortium, Inc. ("ISC")
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+/**
+ @page libdatabase libkea-database - Kea Database Library
+
+@section databaseMTConsiderations Multi-Threading Consideration for Database
+
+MySQL and PostgreSQL provide connection pools which is used to make
+lease, host and legal log backends thread safe. Cassandra/CQL is
+thread safe by design.
+
+MySQL and PostgreSQL are inter-process safe only when transactions are used
+(including the MySQL auto-transaction mode which includes queries into
+a transaction). For MySQL this means that transactions must be supported
+by the database engine (the engine selection is done in the schema).
+
+Note the InnoDB engine used by Kea for MySQL databases cancels a transaction
+when a deadlock is detected (rare but possible event) and leaves the charge
+to retry the transaction to the caller.
+
+*/