db_rules revision 239e16ec9e931bc94c2a00f328945951fca959f5
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews
70be3889746884692aa49939833d624ddd432bf0Mark AndrewsHere is a more formal statement of the important database design
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrewsrules. Each rule is given a 5 character mnemonic for referral
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrewsconvenience.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews
70be3889746884692aa49939833d624ddd432bf0Mark Andrews
70be3889746884692aa49939833d624ddd432bf0Mark AndrewsReference Safety [DBREF]
70be3889746884692aa49939833d624ddd432bf0Mark Andrews
70be3889746884692aa49939833d624ddd432bf0Mark Andrews 1) Any node reference retrieved from the database shall remain
70be3889746884692aa49939833d624ddd432bf0Mark Andrews valid until discarded by the caller.
70be3889746884692aa49939833d624ddd432bf0Mark Andrews
70be3889746884692aa49939833d624ddd432bf0Mark Andrews 2) Any rdataset retrieved from the database shall remain valid,
70be3889746884692aa49939833d624ddd432bf0Mark Andrews with its rdata contents unaltered, until it has been discarded
70be3889746884692aa49939833d624ddd432bf0Mark Andrews by the caller.
70be3889746884692aa49939833d624ddd432bf0Mark Andrews
70be3889746884692aa49939833d624ddd432bf0Mark Andrews
e13d04fda918c0c14c2247475bb99e0760d9a6a4Evan HuntDatabase Type [DBTYP]
70be3889746884692aa49939833d624ddd432bf0Mark Andrews
70be3889746884692aa49939833d624ddd432bf0Mark Andrews Every database is either a zone database or a cache database. This
70be3889746884692aa49939833d624ddd432bf0Mark Andrews type is chosen when the database is created and cannot be altered.
70be3889746884692aa49939833d624ddd432bf0Mark Andrews
70be3889746884692aa49939833d624ddd432bf0Mark Andrews
70be3889746884692aa49939833d624ddd432bf0Mark AndrewsBasic Versioning [DBVER]
70be3889746884692aa49939833d624ddd432bf0Mark Andrews
70be3889746884692aa49939833d624ddd432bf0Mark Andrews The rdata contents of a committed version in a zone database
70be3889746884692aa49939833d624ddd432bf0Mark Andrews do not change.
70be3889746884692aa49939833d624ddd432bf0Mark Andrews
70be3889746884692aa49939833d624ddd432bf0Mark Andrews
3865e18d3d076d018e9d6b1fa033ac5f5cffc7c7Tinderbox UserDatabase Future Version [DBFUV]
70be3889746884692aa49939833d624ddd432bf0Mark Andrews
70be3889746884692aa49939833d624ddd432bf0Mark Andrews 1) Zone databases may have at most one open future version.
70be3889746884692aa49939833d624ddd432bf0Mark Andrews
70be3889746884692aa49939833d624ddd432bf0Mark Andrews 2) When committed, the future version becomes the current version.
70be3889746884692aa49939833d624ddd432bf0Mark Andrews
70be3889746884692aa49939833d624ddd432bf0Mark Andrews 3) Until it is committed, the future version changes may be
70be3889746884692aa49939833d624ddd432bf0Mark Andrews rolled back.
70be3889746884692aa49939833d624ddd432bf0Mark Andrews
70be3889746884692aa49939833d624ddd432bf0Mark Andrews
70be3889746884692aa49939833d624ddd432bf0Mark AndrewsNode Lookups [DBNLU]
70be3889746884692aa49939833d624ddd432bf0Mark Andrews
70be3889746884692aa49939833d624ddd432bf0Mark Andrews A node lookup shall return:
70be3889746884692aa49939833d624ddd432bf0Mark Andrews
70be3889746884692aa49939833d624ddd432bf0Mark Andrews 1) A node handle if the node was found.
70be3889746884692aa49939833d624ddd432bf0Mark Andrews
70be3889746884692aa49939833d624ddd432bf0Mark Andrews 2) A result code.
70be3889746884692aa49939833d624ddd432bf0Mark Andrews
3) Ancestor information. (XXX MORE INFO XXX)
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.
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.