Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC-32052 Improve WsStore fetch miss message #18840

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions esp/services/ws_store/espstorelib/daliKVStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,15 +401,11 @@ bool CDALIKVStore::fetch(const char * storename, const char * ns, const char * k
{
xpath.appendf("/%s", key);
if(!storetree->hasProp(xpath.str()))
{
throw makeStringExceptionV(ECLWATCH_INVALID_QUERY_KEY, "DALI Keystore fetch: invalid key '%s' detected!", key);
}
return false;
else
{
value.set(storetree->queryProp(xpath.str()));
}

return value.str();
return true;
}
else
throw makeStringException(-1, "DALI Keystore fetch: Key not provided!");
Expand Down
20 changes: 3 additions & 17 deletions esp/services/ws_store/ws_storeService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,25 +312,11 @@ bool CwsstoreEx::onFetch(IEspContext &context, IEspFetchRequest &req, IEspFetchR
storename = m_defaultStore.get();
}

try
{
m_storeProvider->fetch(storename, req.getNamespace(), req.getKey(), value, secuser.get(), !req.getUserSpecific());
bool success = m_storeProvider->fetch(storename, req.getNamespace(), req.getKey(), value, secuser.get(), !req.getUserSpecific());
if (success)
resp.setValue(value.str());
}
catch(IException * e)
{
if (e->errorCode() == ECLWATCH_INVALID_QUERY_KEY)
{
StringBuffer msg;
LOG(MCuserInfo, "WsStore: %s", e->errorMessage(msg).str());
e->Release();
return false;
}
else
throw e;
}

return true;
return success;
}

bool CwsstoreEx::onFetchKeyMetadata(IEspContext &context, IEspFetchKeyMDRequest &req, IEspFetchKeyMDResponse &resp)
Expand Down
Loading