Skip to content

Commit

Permalink
Merge pull request #1716 from FIWARE/issue/1715
Browse files Browse the repository at this point in the history
Fixed a bug in the subscription cache
  • Loading branch information
kzangeli authored Dec 4, 2024
2 parents e2210a9 + c2f00b6 commit 7ed7ff2
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 7ed7ff2

Please sign in to comment.