From ca637de017ba9df6887226605b69863987d26cbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Duffeck?= Date: Wed, 19 Apr 2023 13:21:37 +0200 Subject: [PATCH 1/3] Fix detecting resources that haven't changed when reindexing spaces This is a regression introduced with the experimental search backport. --- services/search/pkg/content/basic.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/search/pkg/content/basic.go b/services/search/pkg/content/basic.go index ba95ad38ed..0130584bab 100644 --- a/services/search/pkg/content/basic.go +++ b/services/search/pkg/content/basic.go @@ -6,6 +6,7 @@ import ( storageProvider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" "github.com/cs3org/reva/v2/pkg/tags" + "github.com/cs3org/reva/v2/pkg/utils" "github.com/owncloud/ocis/v2/ocis-pkg/log" ) @@ -34,7 +35,7 @@ func (b Basic) Extract(_ context.Context, ri *storageProvider.ResourceInfo) (Doc } if ri.Mtime != nil { - doc.Mtime = time.Unix(int64(ri.Mtime.Seconds), int64(ri.Mtime.Nanos)).UTC().Format(time.RFC3339) + doc.Mtime = utils.TSToTime(ri.Mtime).Format(time.RFC3339Nano) } return doc, nil From 22363ee3a46e7c941377f3271e59fd512a4b1d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Duffeck?= Date: Wed, 19 Apr 2023 13:27:26 +0200 Subject: [PATCH 2/3] Add changelog --- .../fix-search-reindexing-performance-regression.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 changelog/unreleased/fix-search-reindexing-performance-regression.md diff --git a/changelog/unreleased/fix-search-reindexing-performance-regression.md b/changelog/unreleased/fix-search-reindexing-performance-regression.md new file mode 100644 index 0000000000..463891d041 --- /dev/null +++ b/changelog/unreleased/fix-search-reindexing-performance-regression.md @@ -0,0 +1,6 @@ +Bugfix: Fix Search reindexing performance regression + +We've fixed a regression in the search service reindexing step, causing the +whole space to be reindexed instead of just the changed resources. + +https://github.com/owncloud/ocis/pull/6085 From 5b9a042c5e694e9d8bec42dca4b1ab61aed2058f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Duffeck?= Date: Wed, 19 Apr 2023 18:36:34 +0200 Subject: [PATCH 3/3] Tidy modules --- go.sum | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.sum b/go.sum index e658ce32e9..c6eb35b38e 100644 --- a/go.sum +++ b/go.sum @@ -627,8 +627,6 @@ github.com/crewjam/httperr v0.2.0 h1:b2BfXR8U3AlIHwNeFFvZ+BV1LFvKLlzMjzaTnZMybNo github.com/crewjam/httperr v0.2.0/go.mod h1:Jlz+Sg/XqBQhyMjdDiC+GNNRzZTD7x39Gu3pglZ5oH4= github.com/crewjam/saml v0.4.13 h1:TYHggH/hwP7eArqiXSJUvtOPNzQDyQ7vwmwEqlFWhMc= github.com/crewjam/saml v0.4.13/go.mod h1:igEejV+fihTIlHXYP8zOec3V5A8y3lws5bQBFsTm4gA= -github.com/cs3org/reva/v2 v2.12.1-0.20230404090709-bb973fae26ae h1:APfYubzIYqCTXtmX6cAm4c8wBYS3R/cZwomX8IlXLaI= -github.com/cs3org/reva/v2 v2.12.1-0.20230404090709-bb973fae26ae/go.mod h1:FNAYs5H3xs8v0OFmNgZtiMAzIMXd/6TJmO0uZuNn8pQ= github.com/cs3org/reva/v2 v2.12.1-0.20230417084429-b3d96f9db80c h1:H6OjKTaRowZfAU/Hwvv4W0pLFFH/KNbHaNVNw3ANoHU= github.com/cs3org/reva/v2 v2.12.1-0.20230417084429-b3d96f9db80c/go.mod h1:FNAYs5H3xs8v0OFmNgZtiMAzIMXd/6TJmO0uZuNn8pQ= github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI=