]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Get current LogFileNumberSize the same as log_writer (#10086)
authorJay Zhuang <zjay@fb.com>
Wed, 1 Jun 2022 22:33:22 +0000 (15:33 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 1 Jun 2022 22:33:22 +0000 (15:33 -0700)
commit5864900cf4e4eb0573d771bf1e94f0ac6fc1475e
tree5273bca4803908790cd4a03378450599e667d4b3
parent463873f1bbc8e697e44488a3d1c700aa307f737c
Get current LogFileNumberSize the same as log_writer (#10086)

Summary:
`db_impl.alive_log_files_` is used to track the WAL size in `db_impl.logs_`.
Get the `LogFileNumberSize` obj in `alive_log_files_` the same time as `log_writer` to keep them consistent.
For this issue, it's not safe to do `deque::reverse_iterator::operator*` and `deque::pop_front()` concurrently,
so remove the tail cache.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10086

Test Plan:
```
# on Windows
gtest-parallel ./db_test --gtest_filter=DBTest.FileCreationRandomFailure -r 1000 -w 100
```

Reviewed By: riversand963

Differential Revision: D36822373

Pulled By: jay-zhuang

fbshipit-source-id: 5e738051dfc7bcf6a15d85ba25e6365df6b6a6af
HISTORY.md
db/db_impl/db_impl.h
db/db_impl/db_impl_open.cc
db/db_impl/db_impl_write.cc