rocksdb/utilities/persistent_cache
Peter Dillinger 0ef88538c6 Improve support for using regexes (#8740)
Summary:
* Consolidate use of std::regex for testing to testharness.cc, to
minimize Facebook linters constantly flagging uses in non-production
code.
* Improve syntax and error messages for asserting some string matches a
regex in tests.
* Add a public Regex wrapper class to encapsulate existing usage in
ObjectRegistry.
* Remove unnecessary include <regex>
* Put warnings that use of Regex in production code could cause bad
performance or stack overflow.

Intended follow-up work:
* Replace std::regex with another underlying implementation like RE2
* Improve ObjectRegistry interface in terms of possibly confusing literal
string matching vs. regex and in terms of reporting invalid regex.

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

Test Plan:
tests updated, basic unit test for public Regex, and some manual
testing of temporary changes to see example error messages:

utilities/backupable/backupable_db_test.cc:917: Failure
000010_1162373755_138626.blob (child.name)
does not match regex
[0-9]+_[0-9]+_[0-9]+[.]blobHAHAHA (pattern)

db/db_basic_test.cc:74: Failure
R3SHSBA8C4U0CIMV2ZB0 (sid3)
does not match regex [0-9A-Z]{20}HAHAHA

Reviewed By: mrambacher

Differential Revision: D30706246

Pulled By: pdillinger

fbshipit-source-id: ba845e8f563ccad39bdb58f44f04e9da8f78c3fd
2021-09-07 13:05:23 -07:00
..
block_cache_tier.cc Improve support for using regexes (#8740) 2021-09-07 13:05:23 -07:00
block_cache_tier.h Add a SystemClock class to capture the time functions of an Env (#7858) 2021-01-25 22:09:11 -08:00
block_cache_tier_file.cc Use SystemClock* instead of std::shared_ptr<SystemClock> in lower level routines (#8033) 2021-03-15 04:34:11 -07:00
block_cache_tier_file.h Replace most typedef with using= (#8751) 2021-09-07 11:31:59 -07:00
block_cache_tier_file_buffer.h
block_cache_tier_metadata.cc
block_cache_tier_metadata.h Replace most typedef with using= (#8751) 2021-09-07 11:31:59 -07:00
hash_table.h
hash_table_bench.cc
hash_table_evictable.h Replace most typedef with using= (#8751) 2021-09-07 11:31:59 -07:00
hash_table_test.cc
lrulist.h
persistent_cache_bench.cc Use SystemClock* instead of std::shared_ptr<SystemClock> in lower level routines (#8033) 2021-03-15 04:34:11 -07:00
persistent_cache_test.cc Fix a minor issue with initializing the test path (#8555) 2021-07-23 08:38:45 -07:00
persistent_cache_test.h
persistent_cache_tier.cc
persistent_cache_tier.h Replace most typedef with using= (#8751) 2021-09-07 11:31:59 -07:00
persistent_cache_util.h
volatile_tier_impl.cc
volatile_tier_impl.h Replace most typedef with using= (#8751) 2021-09-07 11:31:59 -07:00