2018-03-15 18:32:45 -07:00
|
|
|
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
2016-06-27 14:56:38 +10:00
|
|
|
|
2018-03-15 18:32:45 -07:00
|
|
|
See COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
|
2018-02-23 09:53:12 +01:00
|
|
|
|
2004-03-05 05:14:21 +00:00
|
|
|
$Id: db_rules,v 1.8 2004/03/05 05:04:46 marka Exp $
|
1999-02-23 21:52:10 +00:00
|
|
|
|
1999-02-22 20:58:10 +00:00
|
|
|
Here is a more formal statement of the important database design
|
1999-02-23 21:52:10 +00:00
|
|
|
rules. Each rule has a 5 character mnemonic, for use in source code
|
|
|
|
comments.
|
1999-02-22 20:58:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
Reference Safety [DBREF]
|
|
|
|
|
|
|
|
1) Any node reference retrieved from the database shall remain
|
|
|
|
valid until discarded by the caller.
|
|
|
|
|
|
|
|
2) Any rdataset retrieved from the database shall remain valid,
|
|
|
|
with its rdata contents unaltered, until it has been discarded
|
|
|
|
by the caller.
|
|
|
|
|
|
|
|
|
1999-02-22 21:11:26 +00:00
|
|
|
Database Type [DBTYP]
|
|
|
|
|
|
|
|
Every database is either a zone database or a cache database. This
|
|
|
|
type is chosen when the database is created and cannot be altered.
|
|
|
|
|
|
|
|
|
1999-02-22 20:58:10 +00:00
|
|
|
Basic Versioning [DBVER]
|
|
|
|
|
1999-02-22 21:11:26 +00:00
|
|
|
The rdata contents of a committed version in a zone database
|
|
|
|
do not change.
|
1999-02-22 20:58:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
Database Future Version [DBFUV]
|
|
|
|
|
|
|
|
1) Zone databases may have at most one open future version.
|
|
|
|
|
|
|
|
2) When committed, the future version becomes the current version.
|
|
|
|
|
1999-02-23 21:52:10 +00:00
|
|
|
3) Until committed, the future version changes may be rolled
|
|
|
|
back.
|
1999-02-22 20:58:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
Node Lookups [DBNLU]
|
|
|
|
|
1999-02-22 21:11:26 +00:00
|
|
|
A node lookup shall return:
|
|
|
|
|
|
|
|
1) A node handle if the node was found.
|
|
|
|
|
|
|
|
2) A result code.
|
|
|
|
|
|
|
|
3) Ancestor information. (XXX MORE INFO XXX)
|
1999-02-22 20:58:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
Zone Node Lookups [DBZNL]
|
|
|
|
|
|
|
|
A node zone lookup returns the requested node, if it exists, in the
|
|
|
|
version specified, or DNS_R_NONEXISTENT otherwise.
|
|
|
|
|
|
|
|
|
|
|
|
Zone Rdataset Lookups [DBZRL]
|
|
|
|
|
|
|
|
A zone lookup returns the requested data, if any, in the
|
|
|
|
version specified, or DNS_R_NONEXISTENT otherwise.
|
|
|
|
|
|
|
|
|
|
|
|
Cache Node Lookups [DBCNL]
|
|
|
|
|
|
|
|
1) A node lookup shall return a handle to the desired node,
|
|
|
|
if it exists.
|
|
|
|
|
|
|
|
2) If there is a negative caching entry for the desired node,
|
|
|
|
DNS_R_NONEXISTENT shall be returned.
|
2000-08-01 01:33:37 +00:00
|
|
|
|
1999-02-22 20:58:10 +00:00
|
|
|
3) If the desired node does not exist, and there is not a
|
|
|
|
negative caching entry, DNS_R_UNKNOWN shall be returned.
|
|
|
|
|
|
|
|
|
|
|
|
Cache Rdataset Lookups [DBCRL]
|
|
|
|
|
|
|
|
1) A cache lookup returns the most recently written data
|
|
|
|
(if any).
|
|
|
|
|
|
|
|
2) If there is a negative caching entry for the desired data,
|
|
|
|
DNS_R_NONEXISTENT shall be returned.
|
|
|
|
|
|
|
|
3) If the requested data does not exist, and there is not a
|
|
|
|
negative caching entry, DNS_R_UNKNOWN shall be returned.
|
|
|
|
|
|
|
|
|
|
|
|
Cache Updates [DBCUP]
|
|
|
|
|
|
|
|
Concurrent attempts to update the same rdataset type of a given
|
|
|
|
node must appear to execute in some order.
|