Comments (4)
One possible solution would be to write to a remote tmp file and then in writer.Close() to move/rename the file to its final location.
from cloudstorage.
can't we just remove the backing file at end of writer.Close() ?
from cloudstorage.
There isn't a backing file when you use store.NewWriter since it writes/pipes directly to the target source. I know GCS the best, so in GCS when you begin piping the data via a writer that data/file isn't visible until you call Close(). Then the new data is swapped into place, replacing any existing object and content.
from cloudstorage.
ref:
https://github.com/lytics/cloudstorage/pull/53/files#diff-9bae92b1bb719d9453e4c3469e9e7c8aR560
and
https://github.com/lytics/cloudstorage/pull/53/files#diff-d96c12e79c906a3ad1845c783ac6a5c0R247
This lines both destroy the file when the writer is created.
We should discuss how big of a deal that is, maybe its fine? We'll never get each store to have exactly the same side effects. So, its just a best effort on our part.
from cloudstorage.
Related Issues (20)
- google storage type BucketLifecycleRuleCondition field Age change type to *int64 HOT 2
- AWS S3 write closer does not wait for the inner goroutine to close
- Add support for Azure Blob Storage
- Add support & Interface for Event Based File Listening Model
- embed os.FileInfo in object as interface HOT 1
- local-fs has different folder paths than the cloud (google, aws)
- localfs NewWriter, should use O_TRUNC ? HOT 3
- should be s3 not google HOT 1
- improve sftp support
- sftp improvements
- box.com integration
- S3 Copy/Move performance optimizations HOT 1
- awss3 List method ignores NextMarker
- awss3 List does not call query ApplyFilters HOT 2
- localfs does not remove the cachefile on object.Close() HOT 7
- Tests failing after I modified Move/Copy test cases to use variable len payloads
- Using the Google auth for JWT files w/ out a scope can lead to confusion.
- AWS S3 set endpoint to be used in yandex s3 HOT 3
- LocalFS Prefix Query Does Not Match Filename Prefixes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudstorage.