The primary question is "Are you trying to upgrade the wallet and that is when this error comes in the debug.log?"
If not, what are you trying to achieve?
The unknown wallet records has occured in v0.17 due to the fact that there has been significant changes in the code between 0.15 and 0.17
The v0.15 code didn't consist of the unknown wallet record line and they were like
nKeys = nCKeys = nWatchKeys = nKeyMeta = 0;
...
LogPrintf("Keys: %u plaintext, %u encrypted, %u w/ metadata, %u total\n",
wss.nKeys, wss.nCKeys, wss.nKeyMeta, wss.nKeys + wss.nCKeys);
While in the v0.17, unknown wallet records has been added replacing the older lines and they were like
nKeys = nCKeys = nWatchKeys = nKeyMeta = m_unknown_records = 0;
...
} else if (strType != "bestblock" && strType != "bestblock_nomerkle"){
wss.m_unknown_records++;
...
LogPrintf("Keys: %u plaintext, %u encrypted, %u w/ metadata, %u total. Unknown wallet records: %u\n",
wss.nKeys, wss.nCKeys, wss.nKeyMeta, wss.nKeys + wss.nCKeys, wss.m_unknown_records);
Going by the code, the unknown records are initially assigned to 0, but if the string type is not equal to the bestblock and bestblock_nomerkle value, unknown records seems to increase to 1 value and as such they are printed in the Unknown Wallet Records in the below line. (I am not completely sure of this, if this seems to be wrong someone try to correct me)
You should post the debug.log file here, so that we can get a clear insight on what is happening.
Probably if the wallet is encrypted,
upgradewallet command will not work.