Remove FNDS.useSubDBs() option
As stated several times, putting here in its own issue for discussion:
- We're committed to releasing with subdbs
- The false option is virtually untested and to do it right would double the test time for you
- The false option must be handled with separate code throughout netdb, which adds risk and review time
- If it's envisioned as a ripcord post-release to tell people to change it because something broke, that's unlikely to help if it's not tested.
- blocking/complicating resolution of e.g. multihome #409 (closed)
- so it's adding risk and delaying the release, which is the opposite of a good fallback plan
Much better to spend the time fixing subdbs than testing and fixing the disabled option.
I through the idea out in IRC #saltr as a possible fallback if things weren't converging and we needed to get a release out, and I guess you ran with it? But that's not the case.
Just one example of code that can be ripped out, KNDF.publish(LS):
if (!_context.netDbSegmentor().useSubDbs()){
String dbid = "main netDb";
if (isClientDb()) {
dbid = "client netDb: " + _dbid;
}
if (_localKey != null) {
if (!_localKey.equals(localLeaseSet.getHash()))
if (_log.shouldLog(Log.ERROR))
_log.error("[" + dbid + "]" + "Error, the local LS hash ("
+ _localKey + ") does not match the published hash ("
+ localLeaseSet.getHash() + ")! This shouldn't happen!",
new Exception());
} else {
// This will only happen once when the local LS is first published
_localKey = localLeaseSet.getHash();
if (_log.shouldLog(Log.INFO))
_log.info("[" + dbid + "]" + "Local client LS key initialized to: " + _localKey);
}
}