Skip to content

fix: [OCISDEV-855] handle transient/InternalError storage failures in receivedsharecache retry path - #830

Merged
2403905 merged 1 commit into
mainfrom
fix/OCISDEV-1685-main
Nov 20, 2026
Merged

2403905 merged 1 commit into
mainfrom
fix/OCISDEV-1685-main

Conversation

@2403905

@2403905 2403905 commented Nov 20, 2026

Copy link
Copy Markdown

Backport of #751 to main.

Why

The fix for OCISDEV-1685 (#813) builds on the cas package of #751. main has only the first version of the retry loop (#657). Without #751, #813 does not apply to main.

Change

Same as #751: the cas package and the fixes for the retry path of the jsoncs3 caches (providercache, receivedsharecache, sharecache), the barrier and trash checks in the metadata storage, and the new error types.

Differences from #751

Tests

  • go test -race passes for ./pkg/share/manager/jsoncs3/..., ./pkg/errtypes/..., ./pkg/storage/utils/metadata/..., ./pkg/storage/fs/ocis/blobstore/..., ./internal/grpc/services/storageprovider/... and ./pkg/storage/utils/decomposedfs/.
  • The integration test receivedsharecache_concurrent_test.go passes with a local revad.

Changelog

No entry, as in #751.

🤖 Generated with Claude Code

… receivedsharecache retry path

Backport of #751 from stable-8.0 (cherry picked from commit e28d93d).

Main had the first version of the retry loop (#657). This commit replaces it
with the cas package and the fixes of #751. The fix for OCISDEV-1685 needs them.

Differences from #751:

1. The jsoncs3 cache packages, the cas package, the test helpers and the
   integration test come unchanged from #751.
2. storageprovider.go keeps the IsTooEarly case of main. It adds the cases
   Aborted and AlreadyExists.
3. The TooEarly check in Decomposedfs.Download is not added. Main already
   returns ResourceProcessing for a node in processing.
4. The changes in tree.go and the new tests for tree.go, decomposedfs.go and
   storageprovider.go are not added. Main changed the upload path with the
   upload coordinator, and the tests do not fit.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@2403905
2403905 requested a review from a team as a code owner November 20, 2026 15:28
@kw-security

kw-security commented Nov 20, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@2403905
2403905 merged commit cbb65e2 into main Nov 20, 2026
14 checks passed
@2403905
2403905 deleted the fix/OCISDEV-1685-main branch November 20, 2026 15:52
2403905 added a commit to owncloud/ocis that referenced this pull request Nov 23, 2026
Update reva to the branch of owncloud/reva#832, the backport of
owncloud/reva#813. It depends on owncloud/reva#830, 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
The reva change owncloud/reva#830 changes the ocis blobstore. When the blob
file does not exist, Download now returns a NotFound error. Before, it
returned an error with the text "could not read blob".

The command `ocis storage-users blobstore get` printed only the NotFound
text. The acceptance scenario cliCommands/blobstore.feature:44 expects the
text "download failed: could not read blob".

Add the text "could not read blob" to the message when the error is NotFound.
The message keeps the NotFound error in the chain. Add a unit test for
downloadBlob.

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
* chore(deps): [stable-9.0][OCISDEV-1685] bump reva

Update reva to the stable-9.0 branch at f6b50353c. The update includes these
changes:

1. owncloud/reva#831 handles transient storage errors in the retry path of
   the received share cache.
2. owncloud/reva#829 reads the NATS credentials file once for each
   connection attempt.

The pull request for OCISDEV-1685 needs the first change.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Signed-off-by: Roman Perekhod <[email protected]>

* fix: [OCISDEV-1685] keep the blob read message in the blobstore CLI

The reva change owncloud/reva#830 changes the ocis blobstore. When the blob
file does not exist, Download now returns a NotFound error. Before, it
returned an error with the text "could not read blob".

The command `ocis storage-users blobstore get` printed only the NotFound
text. The acceptance scenario cliCommands/blobstore.feature:44 expects the
text "download failed: could not read blob".

Add the text "could not read blob" to the message when the error is NotFound.
The message keeps the NotFound error in the chain. Add a unit test for
downloadBlob.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Signed-off-by: Roman Perekhod <[email protected]>
(cherry picked from commit 4f104bb)
Signed-off-by: Roman Perekhod <[email protected]>

* docs: [stable-9.0][OCISDEV-1685] add the changelog for the reva bump

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 to owncloud/ocis that referenced this pull request Nov 23, 2026
* chore(deps): [OCISDEV-1685] bump reva

Update reva to the main branch at cbb65e2fd. The update includes these
changes:

1. owncloud/reva#830 handles transient storage errors in the retry path of
   the received share cache.
2. owncloud/reva#828 reads the NATS credentials file once for each
   connection attempt.

The pull request for OCISDEV-1685 needs the first change.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Signed-off-by: Roman Perekhod <[email protected]>

* fix: [OCISDEV-1685] keep the blob read message in the blobstore CLI

The reva change owncloud/reva#830 changes the ocis blobstore. When the blob
file does not exist, Download now returns a NotFound error. Before, it
returned an error with the text "could not read blob".

The command `ocis storage-users blobstore get` printed only the NotFound
text. The acceptance scenario cliCommands/blobstore.feature:44 expects the
text "download failed: could not read blob".

Add the text "could not read blob" to the message when the error is NotFound.
The message keeps the NotFound error in the chain. Add a unit test for
downloadBlob.

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 to owncloud/ocis that referenced this pull request Nov 23, 2026
Update reva to the branch of owncloud/reva#832, the backport of
owncloud/reva#813. The branch is on top of the merged owncloud/reva#830.

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants