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

feat: NodeInfo memory usage optimization when using MongoDB #800

Merged
merged 1 commit into from
Oct 6, 2021

Conversation

DRK3
Copy link
Collaborator

@DRK3 DRK3 commented Oct 4, 2021

Signed-off-by: Derek Trider Derek.Trider@securekey.com

@codecov
Copy link

codecov bot commented Oct 5, 2021

Codecov Report

Merging #800 (a477636) into main (29851de) will decrease coverage by 0.01%.
The diff coverage is 87.32%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #800      +/-   ##
==========================================
- Coverage   89.92%   89.91%   -0.02%     
==========================================
  Files         141      141              
  Lines       12032    12154     +122     
==========================================
+ Hits        10820    10928     +108     
- Misses        747      758      +11     
- Partials      465      468       +3     
Impacted Files Coverage Δ
pkg/activitypub/store/spi/spi.go 25.00% <0.00%> (-2.59%) ⬇️
pkg/activitypub/service/inbox/inbox.go 92.03% <50.00%> (+0.07%) ⬆️
cmd/orb-server/startcmd/start.go 74.00% <71.42%> (+0.05%) ⬆️
pkg/nodeinfo/handler.go 90.32% <85.71%> (+1.03%) ⬆️
pkg/nodeinfo/service.go 90.62% <85.71%> (-1.14%) ⬇️
...ctivitypub/service/activityhandler/inboxhandler.go 87.16% <88.88%> (+0.09%) ⬆️
...tivitypub/service/activityhandler/outboxhandler.go 92.42% <100.00%> (+0.11%) ⬆️
pkg/activitypub/service/outbox/outbox.go 89.24% <100.00%> (+0.07%) ⬆️
pkg/activitypub/store/ariesstore/ariesstore.go 87.26% <100.00%> (+0.16%) ⬆️
pkg/activitypub/store/memstore/memstore.go 94.73% <100.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 29851de...a477636. Read the comment docs.

@DRK3 DRK3 force-pushed the NodeInfoMemoryUsageOptimization branch 6 times, most recently from 18cc016 to ee02723 Compare October 6, 2021 01:31
@DRK3 DRK3 marked this pull request as ready for review October 6, 2021 01:43
@DRK3 DRK3 force-pushed the NodeInfoMemoryUsageOptimization branch 2 times, most recently from f6397a7 to 821d272 Compare October 6, 2021 14:05
@@ -83,7 +83,8 @@ func (h *handler) handleCreateActivity(create *vocab.ActivityType) error {

logger.Debugf("[%s] Storing anchor credential reference [%s]", h.ServiceName, target.Object().ID())

err := h.store.AddReference(store.AnchorCredential, target.Object().ID().URL(), h.ServiceIRI)
err := h.store.AddReference(store.AnchorCredential, target.Object().ID().URL(), h.ServiceIRI,
store.WithActivityType(create.Type().Types()[0]))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a Create type. We shouldn't have a tag here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Signed-off-by: Derek Trider <Derek.Trider@securekey.com>
@DRK3 DRK3 force-pushed the NodeInfoMemoryUsageOptimization branch from 821d272 to a477636 Compare October 6, 2021 15:23
@DRK3 DRK3 merged commit 48ee87d into trustbloc:main Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants