Compare commits
3
Commits
master
...
OCISDEV-796
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f2c482fb9 | ||
|
|
09a2666854 | ||
|
|
1467fca9a0 |
No files matched your search
+1
-1
@@ -1,5 +1,5 @@
|
||||
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
|
||||
|
||||
go 1.25.7
|
||||
go 1.25.10
|
||||
|
||||
require github.com/vektra/mockery/v2 v2.53.5
|
||||
@@ -108,7 +108,7 @@ See the [Install Infinite Scale on a Server](https://doc.owncloud.com/ocis/next/
|
||||
|
||||
Use this method to build and run an instance with the latest code. This is only recommended for development purposes.
|
||||
|
||||
The minimum go version required is `1.25.7`.\
|
||||
The minimum go version required is `1.25.10`.\
|
||||
Note that you need a C compile environment installed as a prerequisite because some dependencies, like reva, have components that require C-Go libraries and toolchains. The command installing for debian based systems is: `sudo apt install build-essential`.
|
||||
|
||||
To build and run a local instance with demo users:
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
Bugfix: Skip indexing of files still in postprocessing
|
||||
|
||||
When the search service re-indexed a space in response to an UploadReady
|
||||
event, the walker visited sibling nodes whose blobs were not yet finalized
|
||||
in the blobstore. Content extraction for those in-flight nodes triggered
|
||||
spurious storage-users error logs (S3 NoSuchKey). The walker now skips
|
||||
nodes marked as processing; they are indexed when their own UploadReady
|
||||
event arrives.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/00000
|
||||
@@ -0,0 +1,11 @@
|
||||
Bugfix: Skip corrupt 0-byte .mpk metadata files instead of aborting list operations
|
||||
|
||||
Listing a folder that contained a node with a 0-byte `.mpk` metadata file
|
||||
previously aborted the entire list operation, which could break a COPY of a
|
||||
large folder structure partway through. The metadata read now returns an
|
||||
error for empty `.mpk` files, allowing the existing skip-on-error logic in
|
||||
the tree walker to log a warning and skip the broken node instead of
|
||||
aborting the listing.
|
||||
|
||||
https://github.com/owncloud/reva/pull/599
|
||||
https://github.com/owncloud/ocis/pull/12326
|
||||
@@ -1,6 +1,6 @@
|
||||
module github.com/owncloud/ocis/v2
|
||||
|
||||
go 1.25.7
|
||||
go 1.25.10
|
||||
|
||||
require (
|
||||
dario.cat/mergo v1.0.2
|
||||
@@ -64,7 +64,7 @@ require (
|
||||
github.com/open-policy-agent/opa v1.12.3
|
||||
github.com/orcaman/concurrent-map v1.0.0
|
||||
github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245
|
||||
github.com/owncloud/reva/v2 v2.0.0-20260519092700-9da01c6fb954
|
||||
github.com/owncloud/reva/v2 v2.0.0-20260519113222-3f69b647ebdb
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/pkg/xattr v0.4.12
|
||||
github.com/prometheus/client_golang v1.23.2
|
||||
|
||||
@@ -742,8 +742,8 @@ github.com/orcaman/concurrent-map v1.0.0 h1:I/2A2XPCb4IuQWcQhBhSwGfiuybl/J0ev9HD
|
||||
github.com/orcaman/concurrent-map v1.0.0/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI=
|
||||
github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245 h1:JRidLTAKhnvyLMRtVtSF4lhBa0NSAOs6fof+d6JnKII=
|
||||
github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245/go.mod h1:z61VMGAJRtR1nbgXWiNoCkxUXP1B3Je9rMuJbnGd+Og=
|
||||
github.com/owncloud/reva/v2 v2.0.0-20260519092700-9da01c6fb954 h1:GBPLDyORHl8aOqZzcFoRnen78WAgovHw4ujsf22lF1c=
|
||||
github.com/owncloud/reva/v2 v2.0.0-20260519092700-9da01c6fb954/go.mod h1:GoXL38+KfetdC2VKl3LJkLQgIW3vsDb/8hph4nEoN4U=
|
||||
github.com/owncloud/reva/v2 v2.0.0-20260519113222-3f69b647ebdb h1:JCRj8PwFESI6Z2xleRCGTtAyIZc2sb3Owxoy5vaAR8s=
|
||||
github.com/owncloud/reva/v2 v2.0.0-20260519113222-3f69b647ebdb/go.mod h1:GoXL38+KfetdC2VKl3LJkLQgIW3vsDb/8hph4nEoN4U=
|
||||
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw=
|
||||
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0=
|
||||
github.com/pablodz/inotifywaitgo v0.0.9 h1:njquRbBU7fuwIe5rEvtaniVBjwWzcpdUVptSgzFqZsw=
|
||||
|
||||
@@ -513,6 +513,11 @@ func (s *Service) IndexSpace(spaceID *provider.StorageSpaceId) error {
|
||||
ResourceId: &rootID,
|
||||
}
|
||||
s.logger.Debug().Str("path", ref.Path).Msg("Walking tree")
|
||||
// Skip nodes still in postprocessing — their blob isn't in the
|
||||
// blobstore yet. Their own UploadReady will re-trigger IndexSpace.
|
||||
if utils.ReadPlainFromOpaque(info.Opaque, "status") == "processing" {
|
||||
return nil
|
||||
}
|
||||
|
||||
resourceID := storagespace.FormatResourceID(info.Id)
|
||||
r, err := s.engine.Lookup(resourceID)
|
||||
|
||||
@@ -339,6 +339,48 @@ var _ = Describe("Searchprovider", func() {
|
||||
Expect(err).ShouldNot(HaveOccurred())
|
||||
Expect(int(upsertCount.Load())).To(Equal(numDirs), "every unindexed file inside an already-indexed directory must be visited")
|
||||
})
|
||||
|
||||
It("skips files still in postprocessing", func() {
|
||||
gatewayClient.On("GetUserByClaim", mock.Anything, mock.Anything).Return(&userv1beta1.GetUserByClaimResponse{
|
||||
Status: status.NewOK(context.Background()),
|
||||
User: user,
|
||||
}, nil)
|
||||
|
||||
processingFile := &sprovider.ResourceInfo{
|
||||
Id: &sprovider.ResourceId{
|
||||
StorageId: "storageid",
|
||||
SpaceId: "spaceid",
|
||||
OpaqueId: "opaqueid",
|
||||
},
|
||||
ParentId: &sprovider.ResourceId{
|
||||
StorageId: "storageid",
|
||||
SpaceId: "spaceid",
|
||||
OpaqueId: "parentopaqueid",
|
||||
},
|
||||
Type: sprovider.ResourceType_RESOURCE_TYPE_FILE,
|
||||
Path: "./inflight.pdf",
|
||||
Size: 1024,
|
||||
Mtime: &typesv1beta1.Timestamp{Seconds: 4000},
|
||||
Opaque: utils.AppendPlainToOpaque(nil, "status", "processing"),
|
||||
}
|
||||
|
||||
gatewayClient.On("Stat", mock.Anything, mock.MatchedBy(func(sreq *sprovider.StatRequest) bool {
|
||||
return sreq.Ref.ResourceId.StorageId == "storageid" &&
|
||||
sreq.Ref.ResourceId.OpaqueId == "spaceid" &&
|
||||
sreq.Ref.ResourceId.SpaceId == "spaceid"
|
||||
})).Return(&sprovider.StatResponse{
|
||||
Status: status.NewOK(context.Background()),
|
||||
Info: processingFile,
|
||||
}, nil)
|
||||
|
||||
err := s.IndexSpace(&sprovider.StorageSpaceId{OpaqueId: "storageid$spaceid!spaceid"})
|
||||
Expect(err).ShouldNot(HaveOccurred())
|
||||
|
||||
// The skip gate fires before any index lookup or extraction.
|
||||
indexClient.AssertNotCalled(GinkgoT(), "Lookup", mock.Anything)
|
||||
indexClient.AssertNotCalled(GinkgoT(), "Upsert", mock.Anything, mock.Anything)
|
||||
extractor.AssertNotCalled(GinkgoT(), "Extract", mock.Anything, mock.Anything, mock.Anything)
|
||||
})
|
||||
})
|
||||
|
||||
Describe("UpdateTags", func() {
|
||||
|
||||
Generated
Vendored
+8
-6
@@ -28,8 +28,8 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/owncloud/reva/v2/pkg/storage/cache"
|
||||
"github.com/google/renameio/v2"
|
||||
"github.com/owncloud/reva/v2/pkg/storage/cache"
|
||||
"github.com/pkg/xattr"
|
||||
"github.com/rogpeppe/go-internal/lockedfile"
|
||||
"github.com/shamaton/msgpack/v2"
|
||||
@@ -250,11 +250,13 @@ func (b MessagePackBackend) loadAttributes(ctx context.Context, path string, sou
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(msgBytes) > 0 {
|
||||
err = msgpack.Unmarshal(msgBytes, &attribs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(msgBytes) == 0 {
|
||||
return nil, errors.New("encountered empty metadata file")
|
||||
}
|
||||
|
||||
err = msgpack.Unmarshal(msgBytes, &attribs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
_, subspan := tracer.Start(ctx, "metaCache.PushToCache")
|
||||
|
||||
Vendored
+1
-1
@@ -1319,7 +1319,7 @@ github.com/orcaman/concurrent-map
|
||||
# github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245
|
||||
## explicit; go 1.18
|
||||
github.com/owncloud/libre-graph-api-go
|
||||
# github.com/owncloud/reva/v2 v2.0.0-20260519092700-9da01c6fb954
|
||||
# github.com/owncloud/reva/v2 v2.0.0-20260519113222-3f69b647ebdb
|
||||
## explicit; go 1.25.7
|
||||
github.com/owncloud/reva/v2/cmd/revad/internal/grace
|
||||
github.com/owncloud/reva/v2/cmd/revad/runtime
|
||||
|
||||
Reference in new issue
Block a user