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

tokio-epoll-uring: use it on the layer-creating code paths #6378

Merged
merged 66 commits into from
Mar 5, 2024

Commits on Feb 5, 2024

  1. Configuration menu
    Copy the full SHA
    a3c88a8 View commit details
    Browse the repository at this point in the history
  2. WIP: statx

    problame committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    c2d8251 View commit details
    Browse the repository at this point in the history
  3. impl

    problame committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    a0032f4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0548374 View commit details
    Browse the repository at this point in the history
  5. clippy

    problame committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    e824c84 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    29b9628 View commit details
    Browse the repository at this point in the history
  7. for real

    problame committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    c2e9cf4 View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2024

  1. fix macos build

    problame committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    4fa0181 View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2024

  1. Configuration menu
    Copy the full SHA
    aaccb7a View commit details
    Browse the repository at this point in the history
  2. WIP

    problame committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    9a4880e View commit details
    Browse the repository at this point in the history
  3. refactor(disk_btree): make BlockWriter::write_blk infallible

    We can probably get rid of the entire trait, but, that's for another time.
    problame committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    b5a00b0 View commit details
    Browse the repository at this point in the history
  4. Merge branch 'problame/integrate-tokio-epoll-uring/write-path/btree-b…

    …uilder-refactor' into problame/integrate-tokio-epoll-uring/write-path/simplify-write-at-api
    problame committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    7ba1949 View commit details
    Browse the repository at this point in the history
  5. finish

    problame committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    91d3e25 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6f65648 View commit details
    Browse the repository at this point in the history
  7. Merge branch 'main' into problame/integrate-tokio-epoll-uring/write-p…

    …ath/refactor-blob-writer
    problame committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    85d5fc6 View commit details
    Browse the repository at this point in the history
  8. use right branch

    problame committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    edabce6 View commit details
    Browse the repository at this point in the history
  9. WIP

    problame committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    e5d15df View commit details
    Browse the repository at this point in the history
  10. WIP

    problame committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    2a39457 View commit details
    Browse the repository at this point in the history
  11. WIP

    problame committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    4659794 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    14bdd84 View commit details
    Browse the repository at this point in the history
  13. make tests pass

    problame committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    4fe3b49 View commit details
    Browse the repository at this point in the history
  14. pull bunch of changes down

    problame committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    a6605a1 View commit details
    Browse the repository at this point in the history
  15. don't pull that in

    problame committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    c92e8a7 View commit details
    Browse the repository at this point in the history
  16. update lib

    problame committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    b0144e2 View commit details
    Browse the repository at this point in the history
  17. fixup

    problame committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    54561a8 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    6c47083 View commit details
    Browse the repository at this point in the history
  19. Merge branch 'main' into problame/integrate-tokio-epoll-uring/write-p…

    …ath/refactor-blob-writer
    problame committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    238296a View commit details
    Browse the repository at this point in the history
  20. Merge branch 'problame/integrate-tokio-epoll-uring/write-path/refacto…

    …r-blob-writer' into problame/integrate-tokio-epoll-uring/write-path/refactor-virtual-file
    problame committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    207764b View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    e5da261 View commit details
    Browse the repository at this point in the history
  22. Merge branch 'main' into problame/integrate-tokio-epoll-uring/write-p…

    …ath/refactor-blob-writer
    problame committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    26e51c7 View commit details
    Browse the repository at this point in the history
  23. Merge branch 'problame/integrate-tokio-epoll-uring/write-path/refacto…

    …r-blob-writer' into problame/integrate-tokio-epoll-uring/write-path/virtual-file-write-all
    problame committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    6f4d182 View commit details
    Browse the repository at this point in the history
  24. Merge remote-tracking branch 'origin/main' into problame/integrate-to…

    …kio-epoll-uring/write-path/refactor-blob-writer
    problame committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    33f3053 View commit details
    Browse the repository at this point in the history
  25. Merge branch 'problame/integrate-tokio-epoll-uring/write-path/refacto…

    …r-blob-writer' into problame/integrate-tokio-epoll-uring/write-path/virtual-file-write-all
    problame committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    33261e4 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    720f633 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2024

  1. Merge remote-tracking branch 'origin/main' into problame/integrate-to…

    …kio-epoll-uring/more-ops
    problame committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    368f2ac View commit details
    Browse the repository at this point in the history
  2. fix copy-pasta

    problame committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    3d8f5d1 View commit details
    Browse the repository at this point in the history
  3. clean up Cargo.toml

    problame committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    183c86c View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2024

  1. WIP

    problame committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    a6d022a View commit details
    Browse the repository at this point in the history
  2. implement write_at IoEngine function & wire it up; only discovered no…

    …w that IoBuf needs to be Send; PITA but feasible
    problame committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    dff1b9b View commit details
    Browse the repository at this point in the history
  3. Merge remote-tracking branch 'origin/problame/integrate-tokio-epoll-u…

    …ring/write-path/virtual-file-write-all-at' into problame/integrate-tokio-epoll-uring/more-ops
    problame committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    64799e6 View commit details
    Browse the repository at this point in the history
  4. Merge branch 'main' into problame/integrate-tokio-epoll-uring/write-p…

    …ath/virtual-file-write-all
    problame committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    8998178 View commit details
    Browse the repository at this point in the history
  5. Merge branch 'problame/integrate-tokio-epoll-uring/write-path/virtual…

    …-file-write-all' into problame/integrate-tokio-epoll-uring/write-path/virtual-file-write-all-at
    problame committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    98fe109 View commit details
    Browse the repository at this point in the history
  6. Merge branch 'problame/integrate-tokio-epoll-uring/write-path/virtual…

    …-file-write-all-at' into problame/integrate-tokio-epoll-uring/more-ops
    problame committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    bfdd86c View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2024

  1. Merge branch 'main' into problame/integrate-tokio-epoll-uring/write-p…

    …ath/virtual-file-write-all-at
    problame committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    87f05ca View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2024

  1. Merge branch 'main' into problame/integrate-tokio-epoll-uring/write-p…

    …ath/virtual-file-write-all-at
    problame committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    ebffde1 View commit details
    Browse the repository at this point in the history
  2. formatting

    problame committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    ab51748 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6a55ac7 View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2024

  1. Merge remote-tracking branch 'origin/main' into problame/integrate-to…

    …kio-epoll-uring/write-path/virtual-file-write-all-at
    problame committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    0316adc View commit details
    Browse the repository at this point in the history
  2. Merge branch 'problame/integrate-tokio-epoll-uring/write-path/virtual…

    …-file-write-all-at' into problame/integrate-tokio-epoll-uring/more-ops
    problame committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    0c50ee9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2c30090 View commit details
    Browse the repository at this point in the history
  4. layer file creation: remove redundant fsync()s

    The `writer.finish()` methods already fsync the inode,
    using `VirtualFile::sync_all()`.
    
    All that the callers need to do is fsync their directory,
    i.e., the timeline directory.
    
    Note that there's a call in the new compaction code that
    is apparently dead-at-runtime, so, I couldn't fix up
    any fsyncs there [Link](https://github.com/neondatabase/neon/blob/502b69b33bbd4ad1b0647e921a9c665249a2cd62/pageserver/src/tenant/timeline/compaction.rs#L204-L211).
    
    In the grand scheme of things, layer durability probably doesn't
    matter anymore because the remote storage is authoritative at all times
    as of #5198. But, let's not break the discipline in htis commit.
    
    part of #6663
    problame committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    32358cf View commit details
    Browse the repository at this point in the history
  5. Merge branch 'problame/integrate-tokio-epoll-uring/layer-write-path-f…

    …sync-cleanups' into problame/integrate-tokio-epoll-uring/more-ops
    problame committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    4d8b9e3 View commit details
    Browse the repository at this point in the history
  6. layer file creation: fsync timeline directories using VirtualFile::sy…

    …nc_all()
    
    Except for the involvement of the VirtualFile fd cache, this is
    equivalent to what happened before at runtime.
    
    Future PR #6378 will implement `VirtualFile::sync_all()` using
    tokio-epoll-uring if that's configured as the io engine.
    This PR is preliminary work for that.
    problame committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    ebf2de5 View commit details
    Browse the repository at this point in the history
  7. layer file creation: fatal_err the timeline dir fsync

    As pointed out in the comments added in this PR:
    the in-memory state of the filesystem already has the layer file in its final place.
    If the fsync fails, but pageserver continues to execute, it's quite easy
    for subsequent pageserver code to observe the file being there and
    assume it's durable, where it really isn't.
    
    It can happen that we get ENOSPC during the fsync.
    However,
    1. the timeline dir is small (remember, the big layer _file_ has already been synced).
       Small data means ENOSPC due to delayed allocation races etc are less likely.
    2. what elase are we going to do in that case?
    
    If we decide to bubble up the error, the file remains on disk.
    We could try to unlink it and fsync after the unlink.
    If that fails, we would _definitely_ need to error out.
    Is it worth the trouble though?
    
    Side note: all this logic about not carrying on after fsync failure
    implies that we `sync` the filesystem successfully before we restart
    the pageserver. Our systemd unit currently does not do that, but should.
    problame committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    ca2ed0b View commit details
    Browse the repository at this point in the history
  8. Merge remote-tracking branch 'origin/main' into problame/integrate-to…

    …kio-epoll-uring/layer-write-path-fsync-cleanups
    problame committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    ce251ac View commit details
    Browse the repository at this point in the history
  9. Merge branch 'problame/integrate-tokio-epoll-uring/layer-write-path-f…

    …sync-cleanups' into problame/integrate-tokio-epoll-uring/create-layer-fatal-err-on-fsync
    problame committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    c4f7a19 View commit details
    Browse the repository at this point in the history
  10. rebase on fatal_err changes

    problame committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    1fe80d7 View commit details
    Browse the repository at this point in the history
  11. Merge remote-tracking branch 'origin/main' into problame/integrate-to…

    …kio-epoll-uring/layer-write-path-fsync-cleanups
    problame committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    5528b16 View commit details
    Browse the repository at this point in the history
  12. Merge branch 'problame/integrate-tokio-epoll-uring/layer-write-path-f…

    …sync-cleanups' into problame/integrate-tokio-epoll-uring/create-layer-fatal-err-on-fsync
    problame committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    c972d17 View commit details
    Browse the repository at this point in the history
  13. Merge branch 'problame/integrate-tokio-epoll-uring/create-layer-fatal…

    …-err-on-fsync' into problame/integrate-tokio-epoll-uring/ioengine-par-fsync
    problame committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    7299a0a View commit details
    Browse the repository at this point in the history
  14. Merge branch 'problame/integrate-tokio-epoll-uring/ioengine-par-fsync…

    …' into problame/integrate-tokio-epoll-uring/more-ops
    problame committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    348649d View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    0b268fc View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2024

  1. Configuration menu
    Copy the full SHA
    00be7e1 View commit details
    Browse the repository at this point in the history
  2. fix doc check

    problame committed Mar 4, 2024
    Configuration menu
    Copy the full SHA
    ffbe466 View commit details
    Browse the repository at this point in the history
  3. Revert "[DO NOT MERGE} CI: test with both io engines"

    This reverts commit 0548374.
    problame committed Mar 4, 2024
    Configuration menu
    Copy the full SHA
    f471a42 View commit details
    Browse the repository at this point in the history
  4. fix macos build

    problame committed Mar 4, 2024
    Configuration menu
    Copy the full SHA
    bdd5228 View commit details
    Browse the repository at this point in the history