1782. [bug] tmark
Corrected a bug that causes kea-dhcp4/kea-dhcp6 servers to crash after
- losing connectivity to a configuration backend database. The servers
+ losing connectivity to a configuration backend database. The servers
now correctly honor the max-reconnect-tries parameter.
(Gitlab #1369)
ControlledDhcpv4Srv::dbReconnect(ReconnectCtlPtr db_reconnect_ctl) {
bool reopened = false;
- // We lost at least one of them, Reopen all of them (lease, host, and CB databases).
+ // We lost at least one of them. Reopen all of them (lease, host, and CB databases).
try {
CfgDbAccessPtr cfg_db = CfgMgr::instance().getCurrentCfg()->getCfgDbAccess();
cfg_db->createManagers();
ControlledDhcpv6Srv::dbReconnect(ReconnectCtlPtr db_reconnect_ctl) {
bool reopened = false;
- // We lost at least one of them, Reopen all of them (lease, host, and CB databases)
+ // We lost at least one of them. Reopen all of them (lease, host, and CB databases).
try {
CfgDbAccessPtr cfg_db = CfgMgr::instance().getCurrentCfg()->getCfgDbAccess();
cfg_db->createManagers();
static DbLostCallback db_lost_callback;
/// @brief Throws an exception if the connection is not usable.
+ /// @throw DbConnectionUnusable
void checkUnusable() {
if (unusable_) {
isc_throw (DbConnectionUnusable, "Attempt to use an invalid connection");
}
protected:
- /// @brief Sets the usable flag to the given value.
- /// @param usable new value for the flag.
+ /// @brief Sets the unusable flag to true.
void markUnusable() { unusable_ = true; }
private:
/// @brief Indicates if the connection can no longer be used for normal
/// operations. Typically a connection is marked unusable after an unrecoverable
- /// DB error. There may be a time during which the connection exists after
+ /// DB error. There may be a time during which the connection exists after
/// such an every during which it cannot be used for anything beyond checking
- /// parameters and error information. This flag can be used as a guard in
- /// code to prevent inadvertant use of a broken connection.
+ /// parameters and error information. This flag can be used as a guard in
+ /// code to prevent inadvertent use of a broken connection.
bool unusable_;
};