Skip to content

Commit

Permalink
More logging
Browse files Browse the repository at this point in the history
  • Loading branch information
aduffeck committed Nov 29, 2023
1 parent 6e30bdd commit c844761
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -347,4 +347,4 @@ require (

replace github.com/go-micro/plugins/v4/store/nats-js => github.com/kobergj/plugins/v4/store/nats-js v1.2.1-0.20231020092801-9463c820c19a

replace github.com/cs3org/reva/v2 => github.com/butonic/reva/v2 v2.0.0-20231129075422-3538d62d126f
replace github.com/cs3org/reva/v2 => github.com/butonic/reva/v2 v2.0.0-20231129102956-cd73b5c67148
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -941,8 +941,8 @@ github.com/bombsimon/logrusr/v3 v3.1.0/go.mod h1:PksPPgSFEL2I52pla2glgCyyd2OqOHA
github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/butonic/reva/v2 v2.0.0-20231129075422-3538d62d126f h1:31OgND2w7cMvV1NYu/Rmj4dSyyKF4ff+B9qfJtBfIn8=
github.com/butonic/reva/v2 v2.0.0-20231129075422-3538d62d126f/go.mod h1:zcrrYVsBv/DwhpyO2/W5hoSZ/k6az6Z2EYQok65uqZY=
github.com/butonic/reva/v2 v2.0.0-20231129102956-cd73b5c67148 h1:EjjxKSuzJfJE44YdYlossPgos3HLfVit14i2ongm2t8=
github.com/butonic/reva/v2 v2.0.0-20231129102956-cd73b5c67148/go.mod h1:zcrrYVsBv/DwhpyO2/W5hoSZ/k6az6Z2EYQok65uqZY=
github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
github.com/bytecodealliance/wasmtime-go/v3 v3.0.2 h1:3uZCA/BLTIu+DqCfguByNMJa2HVHpXvjfy0Dy7g6fuA=
github.com/bytecodealliance/wasmtime-go/v3 v3.0.2/go.mod h1:RnUjnIXxEJcL6BgCvNyzCCRzZcxCgsZCi+RNlvYor5Q=
Expand Down
6 changes: 6 additions & 0 deletions services/settings/pkg/store/metadata/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"path"

"github.com/cs3org/reva/v2/pkg/appctx"
"github.com/cs3org/reva/v2/pkg/store"
olog "github.com/owncloud/ocis/v2/ocis-pkg/log"
"github.com/owncloud/ocis/v2/services/settings/pkg/config"
Expand Down Expand Up @@ -44,13 +45,18 @@ func (c *CachedMDC) SimpleDownload(ctx context.Context, id string) ([]byte, erro

// SimpleUpload caches the answer from SimpleUpload and invalidates the cache
func (c *CachedMDC) SimpleUpload(ctx context.Context, id string, content []byte) error {
log := appctx.GetLogger(ctx).With().Logger()
log.Info().Str("id", id).Msg("CachedMDC SimpleUpload...")

b, err := c.filesCache.Read(id)
if err == nil && len(b) == 1 && string(b[0].Value) == string(content) {
// no need to bug mdc
return nil
}

log.Info().Str("id", id).Msg("CachedMDC calling next.SimpleUpload...")
err = c.next.SimpleUpload(ctx, id, content)
log.Info().Str("id", id).Msg("CachedMDC next.SimpleUpload done")
if err != nil {
return err
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1
github.com/cs3org/go-cs3apis/cs3/storage/registry/v1beta1
github.com/cs3org/go-cs3apis/cs3/tx/v1beta1
github.com/cs3org/go-cs3apis/cs3/types/v1beta1
# github.com/cs3org/reva/v2 v2.16.1-0.20231127154323-1e3027b83df5 => github.com/butonic/reva/v2 v2.0.0-20231129075422-3538d62d126f
# github.com/cs3org/reva/v2 v2.16.1-0.20231127154323-1e3027b83df5 => github.com/butonic/reva/v2 v2.0.0-20231129102956-cd73b5c67148
## explicit; go 1.20
github.com/cs3org/reva/v2/cmd/revad/internal/grace
github.com/cs3org/reva/v2/cmd/revad/runtime
Expand Down Expand Up @@ -2279,4 +2279,4 @@ stash.kopano.io/kgol/oidc-go
## explicit; go 1.13
stash.kopano.io/kgol/rndm
# github.com/go-micro/plugins/v4/store/nats-js => github.com/kobergj/plugins/v4/store/nats-js v1.2.1-0.20231020092801-9463c820c19a
# github.com/cs3org/reva/v2 => github.com/butonic/reva/v2 v2.0.0-20231129075422-3538d62d126f
# github.com/cs3org/reva/v2 => github.com/butonic/reva/v2 v2.0.0-20231129102956-cd73b5c67148

0 comments on commit c844761

Please sign in to comment.