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
Raw File
CMakeLists.txt
add_executable(simple_example
  simple_example.cc)
target_link_libraries(simple_example
  ${ROCKSDB_LIB})

add_executable(column_families_example
  column_families_example.cc)
target_link_libraries(column_families_example
  ${ROCKSDB_LIB})

add_executable(compact_files_example
  compact_files_example.cc)
target_link_libraries(compact_files_example
  ${ROCKSDB_LIB})

add_executable(c_simple_example
  c_simple_example.c)
target_link_libraries(c_simple_example
  ${ROCKSDB_LIB})

add_executable(optimistic_transaction_example
  optimistic_transaction_example.cc)
target_link_libraries(optimistic_transaction_example
  ${ROCKSDB_LIB})

add_executable(transaction_example
  transaction_example.cc)
target_link_libraries(transaction_example
  ${ROCKSDB_LIB})

add_executable(compaction_filter_example
  compaction_filter_example.cc)
target_link_libraries(compaction_filter_example
  ${ROCKSDB_LIB})

add_executable(options_file_example
  options_file_example.cc)
target_link_libraries(options_file_example
  ${ROCKSDB_LIB})

add_executable(multi_processes_example
  EXCLUDE_FROM_ALL
  multi_processes_example.cc)
target_link_libraries(multi_processes_example
  ${ROCKSDB_LIB})
back to top