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

Do not log nodes #2463

Merged
merged 2 commits into from
Jan 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -482,7 +482,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.lu.InternalPath(n.ID)
Expand Down