Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open Local File on OpenFile When No Object Exists #399

Closed
wants to merge 8 commits into from

Conversation

foodprocessor
Copy link
Contributor

@foodprocessor foodprocessor commented Dec 21, 2024

✅ What

  • Actually open a local file in OpenFile if there is no object in cloud storage
  • Rename downloadFile to openFileInternal
  • Acquire lock before calling openFileInternal, to allow OpenFile to call it as well
  • Check that openComplete is false before acquiring a lock and calling openFileInternal, to prevent performance issues

🤔 Why

  1. If there is no object to download, there is no performance penalty for opening the file completely.
  2. Without this change, if an application calls Open to create a new file, and then checks if that file exists, we would return ENOENT!

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.

1 participant