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

(Why not) write from multiple shards into the same file? #2469

Open
niekbouman opened this issue Oct 3, 2024 · 1 comment
Open

(Why not) write from multiple shards into the same file? #2469

niekbouman opened this issue Oct 3, 2024 · 1 comment

Comments

@niekbouman
Copy link
Contributor

The documentation of Seastar's file api suggests that writing from multiple shards to the same file simultaneously is not supported, at least not through the dup mechanism:

seastar::file::dup()
...
Note
Use on read-only files.

Assuming that we would ensure that there is enough space in the file (by pre-allocating space), and by ensuring that each shard performs aligned writes in non-overlapping regions,
then is this actually supported by the OS (for the async-IO_DIRECT mode that Seastar uses)?

In case if it would be supported by the OS, then why not by Seastar's file api?

@avikivity
Copy link
Member

It should work. Note performance on large machines may be bad.

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

No branches or pull requests

2 participants