Browse Source

Few TODO notes

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac408@3578 e5f2f494-b856-4b98-b285-d166d9295462
Michal Vaner 14 years ago
parent
commit
1684d297c5

+ 5 - 0
src/lib/nsas/nameserver_address_store.cc

@@ -139,6 +139,8 @@ NameserverAddressStore::lookup(const std::string& zone, uint16_t class_code,
         zone_lru_.touch(zone_ptr);
     }
     zone_ptr->addCallback(callback);
+    // TODO Do this only when there are no callbacks currently
+    // if there are, it means this will be just added as well
     processZone(zone_ptr);
 }
 
@@ -169,6 +171,9 @@ chooseAddress(const NameserverEntry::AddressVector& addresses) {
 
 }
 
+// TODO Pass a nameserver that is responsible for this, as it is not
+// checked for TTL (might be 0)
+// TODO Move this to the zone
 void NameserverAddressStore::processZone(ZonePtr zone) {
     // Addresses of existing nameservers
     NameserverEntry::AddressVector addresses;

+ 1 - 0
src/lib/nsas/nameserver_entry.h

@@ -245,6 +245,7 @@ public:
     //@}
 
 private:
+    // TODO Read-write lock?
     boost::mutex    mutex_;             ///< Mutex protecting this object
     std::string     name_;              ///< Canonical name of the nameserver
     uint16_t        classCode_;         ///< Class of the nameserver

+ 4 - 0
src/lib/nsas/zone_entry.h

@@ -83,6 +83,8 @@ public:
         return HashKey(name_, classCode_);
     }
 
+    // TODO The callbacks must be distinguished - A, AAAA or any of them
+
     /// \short Add another callback here
     void addCallback(boost::shared_ptr<AddressRequestCallback> callback);
     /// \short Is there at last one callback waiting?
@@ -129,6 +131,7 @@ public:
     const_iterator end() const { return (nameservers_.end()); }
     //@}
 
+    // TODO Get rid of this
     /**
      * \short Lock of the zone entry.
      *
@@ -163,6 +166,7 @@ public:
      */
     Lock getLock();
 private:
+    // TODO Read-Write lock?
     mutable boost::mutex    mutex_;     ///< Mutex protecting this zone entry
     std::string     name_;      ///< Canonical zone name
     uint16_t        classCode_; ///< Class code