0ef88538c6
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 |
||
---|---|---|
.. | ||
block_cache_tier_file_buffer.h | ||
block_cache_tier_file.cc | ||
block_cache_tier_file.h | ||
block_cache_tier_metadata.cc | ||
block_cache_tier_metadata.h | ||
block_cache_tier.cc | ||
block_cache_tier.h | ||
hash_table_bench.cc | ||
hash_table_evictable.h | ||
hash_table_test.cc | ||
hash_table.h | ||
lrulist.h | ||
persistent_cache_bench.cc | ||
persistent_cache_test.cc | ||
persistent_cache_test.h | ||
persistent_cache_tier.cc | ||
persistent_cache_tier.h | ||
persistent_cache_util.h | ||
volatile_tier_impl.cc | ||
volatile_tier_impl.h |