Repository navigation
fix: [stable-9.0][OCISDEV-1685] remove stale group shares in jsoncs3 - #833
Merged
2403905 merged 1 commit intoNov 23, 2026
Merged
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Backport of #813 from stable-8.0 (cherry picked from commit ee73b99). This commit depends on the backport of #751 (OCISDEV-855). It applies on top of it. Differences from #813: 1. ProcessEvents keeps the tracing and autoprop context of stable-9.0. It passes this context to purgeSpace and logs the errors that purgeSpace returns. 2. The tests of the received share cache use the new test storage fullDownloadStorage. stable-9.0 has a newer metadata.Disk. It answers NotModified when IfNoneMatch has the etag of the file. The tests inject a conflict while the file does not change, so a re-read would keep the state of the failed write. A real conflict changes the etag, and the production code is not affected. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2403905
force-pushed
the
fix/OCISDEV-1685-stale-group-shares-stable-9.0
branch
from
November 20, 2026 15:56
c2ca151 to
86e9be9
Compare
2403905
added a commit
to owncloud/ocis
that referenced
this pull request
Nov 23, 2026
…e manager Update reva to the branch of owncloud/reva#833, the backport of owncloud/reva#813. It depends on owncloud/reva#831, the backport of owncloud/reva#751. A stale group share is a share ID in the group cache that has no share. On each listing of the received shares, the jsoncs3 share manager uploaded the received.json file of the user again with the same content, and the stale ID stayed. The new reva removes stale group shares, and it removes many shares with one upload for each document. The removal of shares uses at least 3 parallel removals, also when SHARING_USER_JSONCS3_MAX_CONCURRENCY is 1. The default of the setting does not change. The setting description and the changelog describe the minimum. Backport of #13460. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Roman Perekhod <[email protected]>
2403905
added a commit
to owncloud/ocis
that referenced
this pull request
Nov 23, 2026
…e manager Update reva to the branch of owncloud/reva#833, the backport of owncloud/reva#813. The branch is on top of the merged owncloud/reva#831. A stale group share is a share ID in the group cache that has no share. On each listing of the received shares, the jsoncs3 share manager uploaded the received.json file of the user again with the same content, and the stale ID stayed. The new reva removes stale group shares, and it removes many shares with one upload for each document. The removal of shares uses at least 3 parallel removals, also when SHARING_USER_JSONCS3_MAX_CONCURRENCY is 1. The default of the setting does not change. The setting description and the changelog describe the minimum. Backport of #13460. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Roman Perekhod <[email protected]>
2403905
marked this pull request as ready for review
November 23, 2026 16:41
LukasHirt
approved these changes
Nov 23, 2026
deyankiteworks
approved these changes
Nov 23, 2026
2403905
added a commit
to owncloud/ocis
that referenced
this pull request
Nov 23, 2026
…e manager Update reva to the commit b4c4df426. It includes owncloud/reva#833, the backport of owncloud/reva#813. A stale group share is a share ID in the group cache that has no share. On each listing of the received shares, the jsoncs3 share manager uploaded the received.json file of the user again with the same content, and the stale ID stayed. The new reva removes stale group shares, and it removes many shares with one upload for each document. The removal of shares uses at least 3 parallel removals, also when SHARING_USER_JSONCS3_MAX_CONCURRENCY is 1. The default of the setting does not change. The setting description and the changelog describe the minimum. Backport of #13460. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Roman Perekhod <[email protected]>
2403905
added a commit
to owncloud/ocis
that referenced
this pull request
Nov 23, 2026
…e manager (#13545) Update reva to the commit b4c4df426. It includes owncloud/reva#833, the backport of owncloud/reva#813. A stale group share is a share ID in the group cache that has no share. On each listing of the received shares, the jsoncs3 share manager uploaded the received.json file of the user again with the same content, and the stale ID stayed. The new reva removes stale group shares, and it removes many shares with one upload for each document. The removal of shares uses at least 3 parallel removals, also when SHARING_USER_JSONCS3_MAX_CONCURRENCY is 1. The default of the setting does not change. The setting description and the changelog describe the minimum. Backport of #13460. Signed-off-by: Roman Perekhod <[email protected]> Co-authored-by: Claude Sonnet 5.5 <[email protected]>
2403905
added a commit
that referenced
this pull request
Nov 24, 2026
Backport of #813 from stable-8.0 (cherry picked from commit ee73b99). This commit depends on the backport of #751 (OCISDEV-855). It applies on top of it. Differences from #813: 1. ProcessEvents keeps the tracing and autoprop context of stable-9.0. It passes this context to purgeSpace and logs the errors that purgeSpace returns. 2. The tests of the received share cache use the new test storage fullDownloadStorage. stable-9.0 has a newer metadata.Disk. It answers NotModified when IfNoneMatch has the etag of the file. The tests inject a conflict while the file does not change, so a re-read would keep the state of the failed write. A real conflict changes the etag, and the production code is not affected. Co-authored-by: Claude Sonnet 5.5 <[email protected]> Backport of #833 to stable-8.2.
2403905
added a commit
to owncloud/ocis
that referenced
this pull request
Nov 25, 2026
…e manager Update reva to the commit 1b56ab246 of owncloud/reva#844, the backport of owncloud/reva#833 to stable-8.2. A stale group share is a share ID in the group cache that has no share. On each listing of the received shares, the jsoncs3 share manager uploaded the received.json file of the user again with the same content, and the stale ID stayed. The new reva removes stale group shares, and it removes many shares with one upload for each document. The removal of shares uses at least 3 parallel removals, also when SHARING_USER_JSONCS3_MAX_CONCURRENCY is 1. The default of the setting does not change. The setting description and the changelog describe the minimum. Backport of #13545 to stable-8.2. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Roman Perekhod <[email protected]>
2403905
added a commit
to owncloud/ocis
that referenced
this pull request
Nov 25, 2026
…e manager (#13561) * fix: [stable-8.2][OCISDEV-1685] remove stale group shares in the share manager Update reva to the commit 1b56ab246 of owncloud/reva#844, the backport of owncloud/reva#833 to stable-8.2. A stale group share is a share ID in the group cache that has no share. On each listing of the received shares, the jsoncs3 share manager uploaded the received.json file of the user again with the same content, and the stale ID stayed. The new reva removes stale group shares, and it removes many shares with one upload for each document. The removal of shares uses at least 3 parallel removals, also when SHARING_USER_JSONCS3_MAX_CONCURRENCY is 1. The default of the setting does not change. The setting description and the changelog describe the minimum. Backport of #13545 to stable-8.2. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Roman Perekhod <[email protected]> * docs: [stable-8.2][OCISDEV-1685] fix the pull request number in the changelog Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Roman Perekhod <[email protected]> --------- Signed-off-by: Roman Perekhod <[email protected]> Co-authored-by: Claude Sonnet 5.5 <[email protected]>
2403905
added a commit
that referenced
this pull request
Nov 25, 2026
…844) Backport of #813 from stable-8.0 (cherry picked from commit ee73b99). This commit depends on the backport of #751 (OCISDEV-855). It applies on top of it. Differences from #813: 1. ProcessEvents keeps the tracing and autoprop context of stable-9.0. It passes this context to purgeSpace and logs the errors that purgeSpace returns. 2. The tests of the received share cache use the new test storage fullDownloadStorage. stable-9.0 has a newer metadata.Disk. It answers NotModified when IfNoneMatch has the etag of the file. The tests inject a conflict while the file does not change, so a re-read would keep the state of the failed write. A real conflict changes the etag, and the production code is not affected. Co-authored-by: Claude Sonnet 5.5 <[email protected]> Backport of #833 to stable-8.2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #813 to
stable-9.0.Dependency
This PR needs the backport of #751 (OCISDEV-855), #831. That PR is merged.
Problem
The jsoncs3 share manager uploaded
received.jsonagain on each listing of the received shares when a user had a stale group share. A stale group share is a share ID in the group cache that has no share in the provider cache. The removal changed nothing, the stale ID stayed, and this repeated on each listing. Stale group shares come from partial write failures inShareandremoveShare.Ticket: OCISDEV-1685. The description and the numbers are in #813.
Change
Same as #813: the cleanup of stale group shares with a grace period, the rollback in
Share, the batch removal with one upload per document, the drop of the cached document after a failed upload, the fix for the panic insharecache.Cache.Remove(OCISDEV-1675), and theShareExpiredevent once for each expired share.Differences from #813
ProcessEventsinpkg/share/manager/jsoncs3/jsoncs3.gokeeps the tracing and autoprop context ofstable-9.0. It passes this context topurgeSpaceand logs the returned errors.receivedsharecache_test.gouse the newfullDownloadStorage.stable-9.0has a newermetadata.Disk. It answersNotModifiedwhenIfNoneMatchhas the etag of the file. Five tests inject a conflict while the file does not change. Then the re-read keeps the state of the failed write. A real conflict changes the etag, so the production code is not affected. Without the new test storage, these five tests fail.Tests
go test -racepasses for./pkg/share/manager/jsoncs3/....go build ./...passes.🤖 Generated with Claude Code