GithubHelp home page GithubHelp logo

metwork-framework / xattrfile Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 38 KB

This is a python module for dealing with files with tags stored in a redis instance.

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.65% Python 99.35%
integration-level-3 autoreadme github-actions

xattrfile's Introduction

xattrfile

Status (master branch)

GitHub CI Maintenance

What is it?

This is a python module for dealing with files with tags stored in a redis instance.

Contributing guide

See CONTRIBUTING.md file.

Code of Conduct

See CODE_OF_CONDUCT.md file.

Sponsors

(If you are officially paid to work on MetWork Framework, please contact us to add your company logo here!)

logo

xattrfile's People

Watchers

 avatar  avatar  avatar

xattrfile's Issues

os.rename() raises "OSError: [Errno 18] Invalid cross-device link" when using different FS

if we set the input data dir for mfdata in another file system, the switch plugin displays the below error message :

[DEBUG] (mfdata.switch.main#24286) Can't move /data/drbd/var/in/input/foobar.txt to /home/mfdata/var/in/tmp/switch.main/28397e0964614d9991771515ff18d920: file does not exist any more ?

it appears the call of os.rename() in XattrFile raises an OSError

OSError: [Errno 18] Invalid cross-device link: '/data/drbd/var/in/input/foobar.txt' -> '/home/mfdata/var/in/tmp/switch.main/28397e0964614d9991771515ff18d920'

because the file is not on the same FS.

  • Possible solution(s) :
  1. (1) stop mfdata
    (2) move /home/mfdata into /data/mfdata (as root)
    (3) ln -s /data/mfdata /home/mfdata
    (4) restart mfdata

  2. replace os.rename(old_filepath, new_filepath) by shutil.move(old_filepath, new_filepath) in XattrFile.rename()

note that shutils.move() first try to do os.rename() then only if it raises an OSError it makes a copy+delete... so it can cause a decrease in performance, as the user's own risk? (maybe we can add a warning message)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.