Skip to content

Commit

Permalink
Do not log nodes (#2463)
Browse files Browse the repository at this point in the history
* Do not log whole nodes

It turns out that logging whole node objects is very expensive and also
spams the logs quite a bit. Instead we just log the node ID now.

* Add changelog
  • Loading branch information
aduffeck authored and butonic committed Feb 14, 2022
1 parent c68b5cd commit d07d63e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions changelog/unreleased/do-not-log-nodes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Enhancement: do not log whole nodes

It turns out that logging whole node objects is very expensive and also
spams the logs quite a bit. Instead we just log the node ID now.

https://github.com/cs3org/reva/pull/2463
2 changes: 1 addition & 1 deletion pkg/storage/utils/decomposedfs/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ func (n *Node) SetFavorite(uid *userpb.UserId, val string) error {

// AsResourceInfo return the node as CS3 ResourceInfo
func (n *Node) AsResourceInfo(ctx context.Context, rp *provider.ResourcePermissions, mdKeys []string, returnBasename bool) (ri *provider.ResourceInfo, err error) {
sublog := appctx.GetLogger(ctx).With().Interface("node", n).Logger()
sublog := appctx.GetLogger(ctx).With().Interface("node", n.ID).Logger()

var fn string
nodePath := n.InternalPath()
Expand Down

0 comments on commit d07d63e

Please sign in to comment.