Repository navigation
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. |
2403905
force-pushed
the
fix/stable-8.0-OCISDEV-1685
branch
4 times, most recently
from
November 17, 2026 18:01
29b954c to
63b62a9
Compare
…e manager Bump reva to a31eb537b, the head 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 from the group cache, only when it read the space file or a Stat proved that the file is missing - removes a stale entry only after a grace period of 5 minutes, and forgets a stale entry 1 hour after the last listing that found it - does not upload a file when a Remove changes nothing, and reads the file again after a failed Add or Remove upload - does not panic in sharecache Remove when the space entry is missing - writes a share before the grantee entry, and rolls back after a failure - removes the share in an unshare also when the grantee entry fails - removes many shares with one upload for each document, with at most MaxConcurrency removals in parallel - publishes one ShareExpired event for each expired share - logs the share cleanup errors after a space delete The default of SHARING_USER_JSONCS3_MAX_CONCURRENCY changes from 1 to 5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Roman Perekhod <2403905@gmail.com>
Pin reva to ea52e6ec5. The new reva commit fixes these problems: - UpdateShare can report success for a change that it did not write. - UpdateShare can write a share again after a parallel unshare. - A listing of the created shares can miss some shares of a space. - A failed removal of a stale share starts a new grace period. Set the default of SHARING_USER_JSONCS3_MAX_CONCURRENCY back to 1. The value also sets the workers of each listing. Commit a35618a set it to 1 because more workers make small machines slower. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Roman Perekhod <2403905@gmail.com>
…n the cleanup Pin reva to c000cf743. The new reva commit fixes these problems in the share cleanup of the ocis shares commands: - The cleanup removed the orphaned shares one at a time. 20 orphaned shares in one space did 60 uploads. They now do 3 uploads. - A Stat error stopped the cleanup with a panic. - A failed gateway selection stopped the cleanup with a panic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Roman Perekhod <2403905@gmail.com>
Pin reva to e3ee7a4ed. The share removals now use a limit of at least 3, also when SHARING_USER_JSONCS3_MAX_CONCURRENCY is 1. With a limit of 1, an unshare needed one more round trip to the storage. The default of the setting does not change and is 1. Describe the floor in the setting description and in the changelog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Roman Perekhod <2403905@gmail.com>
… memory Pin reva to 38d3324ce. The new reva commit fixes these problems in the provider cache of the jsoncs3 share manager: - An unshare reported success, but the share stayed in the space file. - An update returned NotFound for a share that existed. Both occurred after a listing got a temporary NotFound and left an empty copy of the space in memory. A Remove and an Update now read the space file again when the share is not in memory. go mod tidy also removes the go.sum lines of older reva pins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Roman Perekhod <2403905@gmail.com>
…00f664a The new reva commit joins 5 reva commits. The code is the same as in the reva commit 38d3324ce. Only the module version changes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Roman Perekhod <2403905@gmail.com>
The new reva commit keeps a map in a purged provider space. Before, an Add to the purged space on the same pod panicked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2403905
force-pushed
the
fix/stable-8.0-OCISDEV-1685
branch
from
November 18, 2026 16:22
113b3e0 to
ac86cad
Compare
This branch has not been deployed
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.
Description
Bump reva to
v2.0.0-20261117225436-38d3324cefd7(38d3324ce), the head of owncloud/reva#813.The jsoncs3 share manager uploaded the
received.jsonfile of a user again on each listing of the received shares when the user had a stale group share.A stale group share is a share ID in the group cache that has no share.
The removal did not change the file, and the stale ID stayed, so this repeated on each listing.
In production, this causes a large volume of
share not found. cleaning upwarnings and one full document upload per stale share for each listing.Changes in reva
Stale share cleanup
Stat, because a NotFound can be temporary. A second NotFound proves that the file is missing. Thus the cleanup also removes an entry from a failed first share in a space, which has no space file.Manager.StaleShareGracePeriod). An older version writes the grantee entry and the share at the same time. During a rolling upgrade, a listing can find the grantee entry before the share is on storage. Before, the listing removed this entry, and no group member saw the share. The rule applies to user entries and to group entries. A listing that finds the share again restarts the grace period, so two short losses do not add up to one long loss.Removedoes not upload a file when the share is not in it.AddandRemoveManyin each cache drop the cached document. The next call then reads the file again. Before, the memory state stayed different from the file, because the etag did not change and a sync got NotModified. After a failedRemove, a retry found nothing to remove, did not upload, and reported success. The share stayed in the file. After a failedAdd, the pod showed an entry that was not in the file. For example, a client got an error when it accepted a share, but this pod showed the share as accepted.received.jsonof the user to the user cache. Before, it sent the stale group IDs too, and the user cache downloaded the file again to find nothing to remove.Share and unshare
Sharewrites the share before the grantee entry. When a write fails, it removes the entries that it wrote, also the grantee entry. Before, the failed write kept the share ID in memory, and the next write of the grantee document uploaded it.AlreadyExists.ShareRemovedevent went out, and a retry got NotFound. An unshare still fails when the share itself cannot be removed.Batch removal
MaxConcurrency(SHARING_USER_JSONCS3_MAX_CONCURRENCY) limits the parallel removals. The limit is at least 3. Before the batched removal, the removal of one share updated its 3 documents in parallel. With a limit of 1, an unshare needed one more round trip to the storage. When reva gets no value, the limit is 10. Before, a purge of a space with many grantees started one parallel write for each document.ShareExpiredevent for each expired share.providercache.Cache.RemoveManyreturns the IDs that its CAS upload removed, so only one caller wins, also across pods. Before, each listing that found the expired share published an event, also when the removal failed.sharecache.Cache.RemoveManydeletes a space entry when it removes the last share of the space. Before, each listing read the space file of a purged space again.Cleanup of orphaned shares
ocis sharescommands removes all orphaned shares together, with one upload for each document. 20 orphaned shares in one space did 60 uploads and now do 3.Other
ListReceivedSharesand of the listing by resource ID has the fields of one share only. Before, the listing added the fields of each share to the same logger. A later line had the fields of all earlier shares, and a log search found the wrong share.sharecache.Cache.Removeno longer panics when the user or group has no entry for the space of the share, or when the share ID has no delimiter (OCISDEV-1675). Before, the panic stopped the sharing service, also in an unshare and in the cleanup of orphaned shares.Changes in ocis
SHARING_USER_JSONCS3_MAX_CONCURRENCYdoes not change and is 1. The value sets the number of listing workers and the limit of parallel removals. More listing workers make small machines slower.SHARING_USER_JSONCS3_MAX_CONCURRENCYnow says that the removal of shares always uses at least 3 parallel go-routines.Vendor diff
Against the reva pin of
stable-8.0(48aa66c6d, #13446), this bump adds only the commits of owncloud/reva#813. They change only these files:pkg/share/manager/jsoncs3/jsoncs3.gopkg/share/manager/jsoncs3/providercache/providercache.gopkg/share/manager/jsoncs3/receivedsharecache/receivedsharecache.gopkg/share/manager/jsoncs3/sharecache/sharecache.goChangelog
changelog/unreleased/bugfix-jsoncs3-stale-group-shares.mdChecks
go mod vendorwithGOWORK=offgives no change.go mod verifypasses.ocis,sharing,storage-users,storage-shares,frontendandgraphpackages build fromvendor/.pkg/share/manager/jsoncs3/...pass with-race. Each new regression test failed before its fix.38d3324ce.Known issues
Manager.initializein reva readsinitializedwithout the lock. The race detector reports it when parallel listings start on a new manager. This race also exists onstable-8.0. It needs a separate fix.Manager.Loadin reva, which the share migration uses, callsUserReceivedStates.Addwith only the space ID as the key. The other code usesstorageid:spaceid. Migrated user shares can thus get the wrong key. A code review found this. No test confirms it yet. It also exists onstable-8.0and needs a separate ticket.Status
Draft. It depends on owncloud/reva#813. When that pull request is merged, the reva version must point to the merge commit on reva
stable-8.0.Reva
stable-8.0also hase140a3899(owncloud/reva#812, OCISDEV-1140), which is not in the current pin. The re-pin to the merge commit adds it, and it then needs its own changelog entry in ocis.🤖 Generated with Claude Code