|
From: Thien H. <thi...@en...> - 2026-05-15 08:43:22
|
Previously, only sought and matched attributes were logged, which was
insufficient for debugging. It was unclear which attributes were missing
in the cluster.
This commit adds logging to explicitly show missing attributes, making
debugging more straightforward.
---
src/imm/immnd/ImmModel.cc | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/src/imm/immnd/ImmModel.cc b/src/imm/immnd/ImmModel.cc
index d0add57d8..d79e7a5be 100644
--- a/src/imm/immnd/ImmModel.cc
+++ b/src/imm/immnd/ImmModel.cc
@@ -18,6 +18,7 @@
*/
#include <set>
+#include <list>
#include <algorithm>
#include <time.h>
@@ -12439,10 +12440,22 @@ SaAisErrorT ImmModel::accessorGet(const ImmsvOmSearchInit* req,
if ((searchOptions & SA_IMM_SEARCH_GET_SOME_ATTR) &&
(matchedAttributes != soughtAttributes)) {
+ std::string attributeNames;
+ ImmsvAttrNameList* list = req->attributeNames;
+ while (list) {
+ size_t sz = strnlen((char*)list->name.buf, (size_t)list->name.size);
+ std::string attName((const char*)list->name.buf, sz);
+ if (obj->mAttrValueMap.find(attName) == obj->mAttrValueMap.end()) {
+ if (!attributeNames.empty()) attributeNames += ", ";
+ attributeNames += attName;
+ }
+ list = list->next;
+ }
LOG_NO(
- "ERR_NOT_EXIST: Some attributeNames did not exist in Object '%s' "
- "(nrof names:%u matched:%u)",
- objectName.c_str(), soughtAttributes, matchedAttributes);
+ "ERR_NOT_EXIST: Some attributeNames '%s' did not exist in Object '%s' "
+ "(nrof names:%d matched:%d)",
+ attributeNames.c_str(), objectName.c_str(), soughtAttributes,
+ matchedAttributes);
err = SA_AIS_ERR_NOT_EXIST;
}
--
2.34.1
The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection.
Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions.
|