Skip to content

How to handle registered file rotations? (Opening a new file that all later ops should use) #1011

Answered by isilence
RedBeard0531 asked this question in Q&A
Discussion options

You must be logged in to vote

First of all, I always discourage people for using DRAIN, as its performance is miserable, maintaining it is hard, there will cases when using drain once in past would be slowing down the ring for its entire lifetime, and there are even features incompatible with DRAIN (e.g. IOSQE_CQE_SKIP_SUCCESS). Instead, userspace can count the number of inflight requests for a file.

* Do I need to mark the `openat` SQE with `DRAIN` to avoid racing with earlier operations and closing the file under them? Ideally, I'd like it to be able to run concurrently with the fsync, if it wouldn't interfere. I know I _could_ maintain a rotation of 

All requests can get executed asynchronous in parallel, so unl…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by RedBeard0531
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants