Revision cff0d1e8e68e6360328fa39e01e8566747185947 authored by Peter Dillinger on 18 March 2022, 18:06:17 UTC, committed by Facebook GitHub Bot on 18 March 2022, 18:06:17 UTC
Summary:
The primary goal of this change is to add support for backing up and
restoring (applying on restore) file temperature metadata, without
committing to either the DB manifest or the FS reported "current"
temperatures being exclusive "source of truth".

To achieve this goal, we need to add temperature information to backup
metadata, which requires updated backup meta schema. Fortunately I
prepared for this in https://github.com/facebook/rocksdb/issues/8069, which began forward compatibility in version
6.19.0 for this kind of schema update. (Previously, backup meta schema
was not extensible! Making this schema update public will allow some
other "nice to have" features like taking backups with hard links, and
avoiding crc32c checksum computation when another checksum is already
available.) While schema version 2 is newly public, the default schema
version is still 1. Until we change the default, users will need to set
to 2 to enable features like temperature data backup+restore. New
metadata like temperature information will be ignored with a warning
in versions before this change and since 6.19.0. The metadata is
considered ignorable because a functioning DB can be restored without
it.

Some detail:
* Some renaming because "future schema" is now just public schema 2.
* Initialize some atomics in TestFs (linter reported)
* Add temperature hint support to SstFileDumper (used by BackupEngine)

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

Test Plan:
related unit test majorly updated for the new functionality,
including some shared testing support for tracking temperatures in a FS.

Some other tests and testing hooks into production code also updated for
making the backup meta schema change public.

Reviewed By: ajkr

Differential Revision: D34686968

Pulled By: pdillinger

fbshipit-source-id: 3ac1fa3e67ee97ca8a5103d79cc87d872c1d862a
1 parent 3bdbf67
History
File Mode Size
composite_env.cc -rw-r--r-- 15.5 KB
composite_env_wrapper.h -rw-r--r-- 13.1 KB
emulated_clock.h -rw-r--r-- 3.6 KB
env.cc -rw-r--r-- 45.4 KB
env_basic_test.cc -rw-r--r-- 13.7 KB
env_chroot.cc -rw-r--r-- 5.1 KB
env_chroot.h -rw-r--r-- 1.9 KB
env_encryption.cc -rw-r--r-- 49.5 KB
env_encryption_ctr.h -rw-r--r-- 4.5 KB
env_posix.cc -rw-r--r-- 16.1 KB
env_test.cc -rw-r--r-- 108.0 KB
file_system.cc -rw-r--r-- 9.0 KB
file_system_tracer.cc -rw-r--r-- 21.8 KB
file_system_tracer.h -rw-r--r-- 17.1 KB
fs_posix.cc -rw-r--r-- 38.4 KB
fs_readonly.h -rw-r--r-- 4.0 KB
fs_remap.cc -rw-r--r-- 13.7 KB
fs_remap.h -rw-r--r-- 5.7 KB
io_posix.cc -rw-r--r-- 51.3 KB
io_posix.h -rw-r--r-- 16.6 KB
io_posix_test.cc -rw-r--r-- 4.2 KB
mock_env.cc -rw-r--r-- 32.3 KB
mock_env.h -rw-r--r-- 6.6 KB
mock_env_test.cc -rw-r--r-- 2.7 KB
unique_id_gen.cc -rw-r--r-- 5.1 KB
unique_id_gen.h -rw-r--r-- 2.8 KB

back to top