Skip to content

Commit

Permalink
Fixed a bug in the subscription cache
Browse files Browse the repository at this point in the history
  • Loading branch information
kzangeli committed Dec 4, 2024
1 parent e2210a9 commit c2f00b6
Show file tree
Hide file tree
Showing 4 changed files with 699 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Fixed Issues:
#1698: Not fixed, but making it usable. Real fix coming. Needs a complete rewrite.
#1704: problem when the number of tenants is bigger than the size of the mongo connection pool
#1704: Problem when the number of tenants is bigger than the size of the mongo connection pool
#1715: Bug in subscription cache: attributes in notification::attributes were not longnames after a restart with subscriptions in the DB
#XXXX: various fixes for DDS

## New Features:
Expand Down
7 changes: 5 additions & 2 deletions src/lib/orionld/dbModel/dbModelToApiSubscription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,9 +462,12 @@ KjNode* dbModelToApiSubscription
kjChildAdd(notificationP, dbAttrsP);

// Find alias for all attributes
for (KjNode* attrNameNodeP = dbAttrsP->value.firstChildP; attrNameNodeP != NULL; attrNameNodeP = attrNameNodeP->next)
if (forSubCache == false)
{
attrNameNodeP->value.s = orionldContextItemAliasLookup(orionldState.contextP, attrNameNodeP->value.s, NULL, NULL);
for (KjNode* attrNameNodeP = dbAttrsP->value.firstChildP; attrNameNodeP != NULL; attrNameNodeP = attrNameNodeP->next)
{
attrNameNodeP->value.s = orionldContextItemAliasLookup(orionldState.contextP, attrNameNodeP->value.s, NULL, NULL);
}
}
}
}
Expand Down
Loading

0 comments on commit c2f00b6

Please sign in to comment.