BackendModeMarker
final class BackendModeMarker (View source)
Records that a database has been used with the API backend, so the SQL backend can refuse it.
API mode keys zones rows by canonical zone ids, which the SQL backend would read as PowerDNS domains.id: owners, group grants, API key scopes and logs would land on other zones. API mode sets the marker where it writes zones rows; a database without a marker, used before 4.6.0, is classified once from its zones rows.
Constants
| MARKER |
|
| API |
|
| SQL |
|
| SQL_MODE_REFUSAL |
|
| OVERRIDE_HINT |
For the log only: the override when the database was in fact never used with the API backend. |
Methods
For the SQL backend: the refusal message when the database has been used in API mode.
Details
static void
markApi(PDO $db)
Run first in the zone id allocator's transaction. The marker row stays locked until it ends, so concurrent writers queue on this one row instead of on the gaps between zones rows.
static string|null
sqlModeRefusal(PDO $db, string $domainsTable)
For the SQL backend: the refusal message when the database has been used in API mode.