storage/mmap: to call mmap.Flush() ? #751
AskAlexSharov
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
@AskAlexSharov I have considered this in the past. I don't believe mmap flush semantics are standardized, most OS will flush at their whim which is probably best for performance. It's likely that if you have a persistent piece completion database in use, that if it syncs that a piece is complete, but the data isn't actually flushed to disk you could incorrectly treat the piece as complete after dataloss. Perhaps flushing a piece while marking it complete is worthwhile (probably synchronously in that part of the code?). Are you interested in contributing that? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi.
I wonder what will happen in next case:
I don't vote for full ACID here (even that sqlite and boltdb do support transactions). Just wondering: if we can reduce probability of such event.
Does it make sense to call mmap.Flush at some point? When file fully downloaded, or before file close, or periodically or at somehow else.
Beta Was this translation helpful? Give feedback.
All reactions