Replies: 1 comment 5 replies
-
I really like this idea, but why just not "copy"? -- I realize storage is an issue (which is addressed via rent), it seems from the outside perspective that it might be nice to have more control over when the source file is destroyed. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sometimes, you may want to take action when a File in the Hedera File Service has been uploaded. However, each file is uploaded in 6k "chunks", because Hedera has a limit on the size of transactions. One idea, is to add a new "move" transaction to the file service. You can upload the file to the file service, and once it is uploaded, "move" it over top another file.
For example, the properties file is file 121. Rather than uploading a new properties file into 121, which may take multiple chunks, we could upload to some new file (maybe it is 0.0.12345678 -- whatever entity id is next), and then do a "move" from 0.0.12345678 to 0.0.121. "move" would remove the old entity and perform its work without actually moving bytes around. This is actually a little tricky in the implementation, but should be doable without any excessive overhead.
If you have "move", you might also want "copy". However this is really tricky, because we would not want to actually copy the bytes, but we would want copy-on-write behavior. This is probably far from trivial in the implementation today. So we wouldn't do this right now.
Beta Was this translation helpful? Give feedback.
All reactions