Problem/Motivation

stream_flush calls writeUriToCache, however if waitUntilFileExists() returns FALSE no error is raised and no data is written to the s3fs_file table and stream_flush returns TRUE.

This results in the file possibly being present in the bucket but not the metadata cache which could create an inaccessibility of the data with no error raised during the writing phase.

Steps to reproduce

Review s3fsBucketStream

Proposed resolution

Have writeUriToCache() return a bool on success/fail and return that result in stream_flush.

Remaining tasks

Patch

User interface changes

None

API changes

writeUriToCache will return a boolean value on success/failure.
stream_flush will return false if metadata was not written even if the file was written successful to the bucket.

Data model changes

None

Comments

cmlara created an issue. See original summary.

  • cmlara committed daf1ec31 on 4.0.x
    Issue #3346165 by cmlara: stream_flush should not return TRUE if cache...
cmlara’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.