facebook / rocksdb

A library that provides an embeddable, persistent key-value store for fast storage.
http://rocksdb.org
GNU General Public License v2.0
28.09k stars 6.25k forks source link

Don't take archived log size into account when calculating log size for flush #12680

Closed HypenZou closed 1 month ago

HypenZou commented 2 months ago

Context/Summary: It seems unreasonable to take the archived log size into account when calculating log size for flush in method CreateCheckpoint. If the user sets WAL_ttl_seconds or WAL_size_limit_MB, the argument _log_size_forflush can easily be reached due to the size of the archived dir. As a result, the flush may always be triggered. Test corverd by ./checkpoint_test

HypenZou commented 2 months ago

@hx235 thx for review🙏🏻
unit test and history entry has been added

facebook-github-bot commented 1 month ago

@ajkr has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 1 month ago

@HypenZou has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot commented 1 month ago

@ajkr has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 1 month ago

@HypenZou has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot commented 1 month ago

@HypenZou has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot commented 1 month ago

@ajkr has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 1 month ago

@ajkr merged this pull request in facebook/rocksdb@5bb7f95ed6688b914841749e0d192986ce4c252f.