fix(search): bump reva

This commit is contained in:
Alex Ababii committed 2026-12-03 15:56:50 +01:00
1 parent b639ac7fa9
commit db6f2e37dc
4 files changed
+43 -9

No files matched your search

+2 -2
View File
@@ -13,6 +13,7 @@ require (
github.com/bbalet/stopwords v1.0.0
github.com/beevik/etree v1.8.1
github.com/blevesearch/bleve/v2 v2.6.1
github.com/blevesearch/bleve_index_api v1.4.1
github.com/cenkalti/backoff v2.2.1+incompatible
github.com/coreos/go-oidc/v3 v3.21.0
github.com/cs3org/go-cs3apis v0.0.0-20260424072047-8d9ef7076ae9
@@ -69,7 +70,7 @@ require (
github.com/open-policy-agent/opa v1.21.1
github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89
github.com/opencloud-eu/libre-graph-api-go v1.0.9-0.20261119152805-1a7a500a264e
github.com/opencloud-eu/reva/v3 v3.0.2-0.20261202100614-a18d5cce6929
github.com/opencloud-eu/reva/v3 v3.0.2-0.20261203145052-691769b98fa2
github.com/opensearch-project/opensearch-go/v4 v4.7.3
github.com/orcaman/concurrent-map v1.0.0
github.com/pkg/errors v0.9.1
@@ -149,7 +150,6 @@ require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/bitly/go-simplejson v0.5.1 // indirect
github.com/bits-and-blooms/bitset v1.24.2 // indirect
github.com/blevesearch/bleve_index_api v1.4.1 // indirect
github.com/blevesearch/geo v0.2.6 // indirect
github.com/blevesearch/go-faiss v1.1.5 // indirect
github.com/blevesearch/go-porterstemmer v1.0.3 // indirect
+2 -4
View File
@@ -761,10 +761,8 @@ github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89 h1:W1ms+l
github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89/go.mod h1:vigJkNss1N2QEceCuNw/ullDehncuJNFB6mEnzfq9UI=
github.com/opencloud-eu/libre-graph-api-go v1.0.9-0.20261119152805-1a7a500a264e h1:5sf3dNw/eYuuvDL8+3c4pbPSX+Pblw6lsylGtq+cw30=
github.com/opencloud-eu/libre-graph-api-go v1.0.9-0.20261119152805-1a7a500a264e/go.mod h1:lTM8JeGblNpoMySTW7Lui2+c5TTLI95mwxtdUIHHrhU=
github.com/opencloud-eu/reva/v3 v3.0.2-0.20261127131426-04b14c99507e h1:fl8LqvkTJMl8yGAslaCY2OHeWyPgPaW0q6MihMbUF/A=
github.com/opencloud-eu/reva/v3 v3.0.2-0.20261127131426-04b14c99507e/go.mod h1:oqi8rN/Nt2v+Gn/dmY9p2Zct3VHrdvnYtqZWHrjij7M=
github.com/opencloud-eu/reva/v3 v3.0.2-0.20261202100614-a18d5cce6929 h1:suFvSU1XhNSoY8d3/pRHi0/mQFRvvUk2uy7Zz8XnToY=
github.com/opencloud-eu/reva/v3 v3.0.2-0.20261202100614-a18d5cce6929/go.mod h1:oqi8rN/Nt2v+Gn/dmY9p2Zct3VHrdvnYtqZWHrjij7M=
github.com/opencloud-eu/reva/v3 v3.0.2-0.20261203145052-691769b98fa2 h1:tlfKPHbeLsKAWx1/gm/D8Z7+bnRR+AN+kyNTQVMNv9o=
github.com/opencloud-eu/reva/v3 v3.0.2-0.20261203145052-691769b98fa2/go.mod h1:oqi8rN/Nt2v+Gn/dmY9p2Zct3VHrdvnYtqZWHrjij7M=
github.com/opencloud-eu/secure v0.0.0-20260312082735-b6f5cb2244e4 h1:l2oB/RctH+t8r7QBj5p8thfEHCM/jF35aAY3WQ3hADI=
github.com/opencloud-eu/secure v0.0.0-20260312082735-b6f5cb2244e4/go.mod h1:BmF5hyM6tXczk3MpQkFf1hpKSRqCyhqcbiQtiAF7+40=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
@@ -22,6 +22,7 @@ import (
"context"
"encoding/json"
"fmt"
"math/rand/v2"
"os"
"path"
"path/filepath"
@@ -134,7 +135,12 @@ func (c *Cache) Add(ctx context.Context, userID utils.FilenameEncoder, spaceID s
Str("spaceID", spaceID).Logger()
var err error
for retries := 100; retries > 0; retries-- {
for attempt := 0; attempt < 20; attempt++ {
select {
case <-ctx.Done():
return ctx.Err()
default:
}
err = persistFunc()
switch err.(type) {
case nil:
@@ -158,6 +164,13 @@ func (c *Cache) Add(ctx context.Context, userID utils.FilenameEncoder, spaceID s
log.Error().Err(err).Msg("persisting added received share failed")
return err
}
timer := time.NewTimer(expBackoff(attempt))
select {
case <-timer.C:
case <-ctx.Done():
timer.Stop()
return ctx.Err()
}
if err := c.syncWithLock(ctx, userID); err != nil {
span.RecordError(err)
span.SetStatus(codes.Error, err.Error())
@@ -223,7 +236,12 @@ func (c *Cache) Remove(ctx context.Context, userID utils.FilenameEncoder, spaceI
Str("spaceID", spaceID).Logger()
var err error
for retries := 100; retries > 0; retries-- {
for attempt := 0; attempt < 20; attempt++ {
select {
case <-ctx.Done():
return ctx.Err()
default:
}
err = persistFunc()
switch err.(type) {
case nil:
@@ -247,6 +265,13 @@ func (c *Cache) Remove(ctx context.Context, userID utils.FilenameEncoder, spaceI
log.Error().Err(err).Msg("persisting added received share failed")
return err
}
timer := time.NewTimer(expBackoff(attempt))
select {
case <-timer.C:
case <-ctx.Done():
timer.Stop()
return ctx.Err()
}
if err := c.syncWithLock(ctx, userID); err != nil {
span.RecordError(err)
span.SetStatus(codes.Error, err.Error())
@@ -389,6 +414,17 @@ func (c *Cache) persist(ctx context.Context, userID utils.FilenameEncoder) error
return nil
}
// expBackoff returns full-jitter delay: rand(0, min(100ms, 2^attempt ms)).
// attempt: 0 1 2 3 4 5 6 7+
// max ms: 1 2 4 8 16 32 64 100
func expBackoff(attempt int) time.Duration {
base := time.Duration(1<<uint(attempt)) * time.Millisecond
if base > 100*time.Millisecond {
base = 100 * time.Millisecond
}
return time.Duration(rand.Int64N(int64(base) + 1))
}
func userJSONPath(userID string) string {
return filepath.Join("/users", userID, "received.json")
}
+1 -1
View File
@@ -1360,7 +1360,7 @@ github.com/opencloud-eu/icap-client
# github.com/opencloud-eu/libre-graph-api-go v1.0.9-0.20261119152805-1a7a500a264e
## explicit; go 1.23
github.com/opencloud-eu/libre-graph-api-go
# github.com/opencloud-eu/reva/v3 v3.0.2-0.20261202100614-a18d5cce6929
# github.com/opencloud-eu/reva/v3 v3.0.2-0.20261203145052-691769b98fa2
## explicit; go 1.26.0
github.com/opencloud-eu/reva/v3/cmd/revad/internal/grace
github.com/opencloud-eu/reva/v3/cmd/revad/runtime