Skip to content

Commit

Permalink
add implementation details for the fs service
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorgan committed Jan 16, 2025
1 parent 4da29c0 commit fd5e35e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/src/docs/rfcs/5556_write_returns_metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ The following functions will be modified to return `Result<Metadata>` instead of

The `writer()` and `writer_with()` return types remain unchanged as they return `Result<Writer>`.

## Changes to struct `types::write::writer::Writer`
## Changes to struct `Writer`

The `Writer` struct will be modified to return `Result<Metadata>` instead of `Result<()>` for the `close()` function.

Expand All @@ -78,7 +78,7 @@ The `Writer` struct will be modified to return `Result<Metadata>` instead of `Re
The `Write` trait will be modified to return `Result<Metadata>` instead of `Result<()>` for the `close()` function.

The `MultipartWrite` trait will be modified to return `Result<Metadata>` instead of `Result<()>` for the `complete_part()`
and `write_once` function.
and `write_once` functions.

## Implementation Details

Expand All @@ -87,7 +87,9 @@ For services that return metadata in their write responses:
- All available fields (etag, version_id, etc.) will be populated

For services that don't return metadata in write responses:
- A default metadata object will be returned
- for `fs`: we can use `stat` to retrieve the metadata before returning. since the metadata is cached by the kernel,
this won't cause a performance issue.
- for other services: A default metadata object will be returned.


# Drawbacks
Expand Down

0 comments on commit fd5e35e

Please sign in to comment.