]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Make comments slightly less inaccurate.
authorMiod Vallat <miod.vallat@powerdns.com>
Thu, 12 Jun 2025 07:36:46 +0000 (09:36 +0200)
committerMiod Vallat <miod.vallat@powerdns.com>
Thu, 12 Jun 2025 09:40:51 +0000 (11:40 +0200)
modules/bindbackend/bindbackend2.cc
pdns/dnsbackend.hh
pdns/packethandler.cc

index 675a372fa9b969695d382b0e20d783fd55d7f102..58a9960b0d6ddf8cfc23643130d0890ce27cf5d3 100644 (file)
@@ -249,6 +249,8 @@ bool Bind2Backend::startTransaction(const ZoneName& qname, domainid_t domainId)
 
 bool Bind2Backend::commitTransaction()
 {
+  // d_transaction_id is only set to a valid domain id if we are actually
+  // setting up a replacement zone file with the updated data.
   if (d_transaction_id == UnknownDomainID) {
     return false;
   }
@@ -268,9 +270,8 @@ bool Bind2Backend::commitTransaction()
 
 bool Bind2Backend::abortTransaction()
 {
-  // -1 = dnssec speciality
-  // 0  = invalid transact
-  // >0 = actual transaction
+  // d_transaction_id is only set to a valid domain id if we are actually
+  // setting up a replacement zone file with the updated data.
   if (d_transaction_id != UnknownDomainID) {
     unlink(d_transaction_tmpname.c_str());
     d_of.reset();
index 19b2efb23f00b2dfd9fd1f287ddeb3a525f5b4dc..0a779c93c8e60f7606caca0629f34ea0e3c9ff2a 100644 (file)
@@ -294,7 +294,6 @@ public:
     return false;
   }
 
-  //! returns true if primary ip is primary for domain name.
   //! starts the transaction for updating domain qname, destroying all
   //! existing data for that domain if id is != UnknownDomainID. In this case,
   //! the id MUST match the DomainInfo information for qname, or very bad things
index c85cb9eeea01a612ee2c7a4f2369940992ac0e98..4c1338a8700c2dffa5aafd40e85e44af3c32f9c5 100644 (file)
@@ -1020,24 +1020,19 @@ void PacketHandler::addNSEC(DNSPacket& /* p */, std::unique_ptr<DNSPacket>& r, c
 
 - only one backend owns the SOA of a zone
 - only one AXFR per zone at a time - double startTransaction should fail
-- backends need to implement transaction semantics
+- backends implement transaction semantics
 
-
-How BindBackend would implement this:
+How BindBackend implements this:
    startTransaction makes a file
    feedRecord sends everything to that file
    commitTransaction moves that file atomically over the regular file, and triggers a reload
-   rollbackTransaction removes the file
-
+   abortTransaction removes the file
 
-How PostgreSQLBackend would implement this:
-   startTransaction starts a sql transaction, which also deletes all records
+How SQL backends implement this:
+   startTransaction starts a sql transaction, which also deletes all records if requested
    feedRecord is an insert statement
    commitTransaction commits the transaction
-   rollbackTransaction aborts it
-
-How MySQLBackend would implement this:
-   (good question!)
+   abortTransaction aborts it
 
 */