Skip to content

_put_file not implemented, breaking simplecache::root:// write caching #109

Description

@MoAly98

Hi,

I noticed while debugging an issue with uproot here that simplecache::root:// writes seem to fail because _put_file() is not implemented in fsspec-xrootd. This means fsspec's remote write caching doesn't work with xrootd. The simplecache:: workflow works fine for S3 protocol, so this motivated me to open this issue.

Reproducer


import fsspec

# Works: simplecache write-through to S3
with fsspec.open("simplecache::s3://bucket/file.txt", "wb", s3={...}) as f:
    f.write(b"hello")
# File uploaded to S3 

# Fails: simplecache write-through to xrootd
with fsspec.open("simplecache::root://server//path/file.txt", "wb") as f:
    f.write(b"hello")
# NotImplementedError on close

Traceback

File fsspec/implementations/cached.py:983, in LocalTempFile.close
    self.commit()
File fsspec/implementations/cached.py:992, in LocalTempFile.commit
    self.fs.put([self.fn], [self.path], **self.kwargs)
File fsspec/asyn.py:525, in AsyncFileSystem._put_file
    raise NotImplementedError

Expected behavior

simplecache::root:// should write to a local temp file and upload to the xrootd server on close, matching the behavior showb in fsspec's documentation and how simplecache::s3:// works.

cc: @alexander-held @nsmith- @ariostas @oshadura

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions