-
Notifications
You must be signed in to change notification settings - Fork 458
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
safekeeper: don't flush control file on WAL ingest path (#9698)
## Problem The control file is flushed on the WAL ingest path when the commit LSN advances by one segment, to bound the amount of recovery work in case of a crash. This involves 3 additional fsyncs, which can have a significant impact on WAL ingest throughput. This is to some extent mitigated by `AppendResponse` not being emitted on segment bound flushes, since this will prevent commit LSN advancement, which will be addressed separately. ## Summary of changes Don't flush the control file on the WAL ingest path at all. Instead, leave that responsibility to the timeline manager, but ask it to flush eagerly if the control file lags the in-memory commit LSN by more than one segment. This should not cause more than `REFRESH_INTERVAL` (300 ms) additional latency before flushing the control file, which is negligible.
- Loading branch information
1 parent
cc8029c
commit 6b19867
Showing
3 changed files
with
13 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6b19867
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5473 tests run: 5240 passed, 3 failed, 230 skipped (full report)
Failures on Postgres 16
test_sharded_ingest[github-actions-selfhosted-1]
: release-x86-64test_storage_controller_many_tenants[github-actions-selfhosted]
: release-x86-64test_compaction_l0_memory[github-actions-selfhosted]
: release-x86-64Flaky tests (4)
Postgres 17
test_create_churn_during_restart
: debug-x86-64test_wal_restore
: release-arm64test_wal_restore_initdb
: release-arm64Postgres 15
test_replica_query_race
: release-x86-64Code coverage* (full report)
functions
:31.8% (7883 of 24826 functions)
lines
:49.5% (62418 of 126222 lines)
* collected from Rust tests only
6b19867 at 2024-11-12T17:12:25.106Z :recycle: