rocksdb/util
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
..
aligned_buffer.h
autovector.h Replace most typedef with using= (#8751) 2021-09-07 11:31:59 -07:00
autovector_test.cc Replace most typedef with using= (#8751) 2021-09-07 11:31:59 -07:00
bloom_impl.h
bloom_test.cc Add Bloom/Ribbon hybrid API support (#8679) 2021-08-20 18:00:16 -07:00
build_version.cc.in
cast_util.h
channel.h
coding.cc
coding.h
coding_lean.h
coding_test.cc
compaction_job_stats_impl.cc
comparator.cc
compression.h rocksdb: don't call LZ4_loadDictHC with null dictionary 2021-08-09 16:05:46 -07:00
compression_context_cache.cc
compression_context_cache.h
concurrent_task_limiter_impl.cc Remove TaskLimiterToken::ReleaseOnce for fix (#8567) 2021-07-21 17:37:53 -07:00
concurrent_task_limiter_impl.h Remove TaskLimiterToken::ReleaseOnce for fix (#8567) 2021-07-21 17:37:53 -07:00
core_local.h
crc32c.cc Replace most typedef with using= (#8751) 2021-09-07 11:31:59 -07:00
crc32c.h
crc32c_arm64.cc
crc32c_arm64.h
crc32c_ppc.c
crc32c_ppc.h
crc32c_ppc_asm.S
crc32c_ppc_constants.h
crc32c_test.cc
defer.h Stable cache keys on ingested SST files (#8669) 2021-08-18 11:33:03 -07:00
defer_test.cc Fix insecure internal API for GetImpl (#8590) 2021-07-29 17:23:01 -07:00
duplicate_detector.h
dynamic_bloom.cc
dynamic_bloom.h
dynamic_bloom_test.cc
fastrange.h
file_checksum_helper.cc
file_checksum_helper.h
file_reader_writer_test.cc Fix a minor issue with initializing the test path (#8555) 2021-07-23 08:38:45 -07:00
filelock_test.cc
filter_bench.cc
gflags_compat.h
hash.cc Built-in support for generating unique IDs, bug fix (#8708) 2021-08-30 15:20:41 -07:00
hash.h Built-in support for generating unique IDs, bug fix (#8708) 2021-08-30 15:20:41 -07:00
hash128.h Upgrade xxhash, add Hash128 (#8634) 2021-08-20 18:41:51 -07:00
hash_map.h
hash_test.cc Built-in support for generating unique IDs, bug fix (#8708) 2021-08-30 15:20:41 -07:00
heap.h
heap_test.cc
kv_map.h Replace most typedef with using= (#8751) 2021-09-07 11:31:59 -07:00
log_write_bench.cc
math.h
math128.h
murmurhash.cc
murmurhash.h Replace most typedef with using= (#8751) 2021-09-07 11:31:59 -07:00
mutexlock.h
ppc-opcode.h
random.cc
random.h
random_test.cc
rate_limiter.cc Implement superior user & mid IO priority level in GenericRateLimiter (#8595) 2021-08-31 11:24:27 -07:00
rate_limiter.h Implement superior user & mid IO priority level in GenericRateLimiter (#8595) 2021-08-31 11:24:27 -07:00
rate_limiter_test.cc Implement superior user & mid IO priority level in GenericRateLimiter (#8595) 2021-08-31 11:24:27 -07:00
regex.cc Improve support for using regexes (#8740) 2021-09-07 13:05:23 -07:00
repeatable_thread.h
repeatable_thread_test.cc
ribbon_alg.h
ribbon_config.cc
ribbon_config.h
ribbon_impl.h Upgrade xxhash, add Hash128 (#8634) 2021-08-20 18:41:51 -07:00
ribbon_test.cc Upgrade xxhash, add Hash128 (#8634) 2021-08-20 18:41:51 -07:00
set_comparator.h
slice.cc
slice_test.cc Improve support for using regexes (#8740) 2021-09-07 13:05:23 -07:00
slice_transform_test.cc
status.cc
stderr_logger.h
stop_watch.h
string_util.cc Remove some unneeded code (#8736) 2021-09-01 14:28:58 -07:00
string_util.h Remove some unneeded code (#8736) 2021-09-01 14:28:58 -07:00
thread_guard.h
thread_list_test.cc
thread_local.cc
thread_local.h Replace most typedef with using= (#8751) 2021-09-07 11:31:59 -07:00
thread_local_test.cc
thread_operation.h
threadpool_imp.cc Prevent joining detached thread in ThreadPoolImpl (#8635) 2021-08-06 19:06:02 -07:00
threadpool_imp.h
timer.h
timer_queue.h
timer_queue_test.cc
timer_test.cc
user_comparator_wrapper.h
vector_iterator.h
work_queue.h
work_queue_test.cc
xxhash.cc Upgrade xxhash, add Hash128 (#8634) 2021-08-20 18:41:51 -07:00
xxhash.h Upgrade xxhash, add Hash128 (#8634) 2021-08-20 18:41:51 -07:00
xxph3.h Upgrade xxhash, add Hash128 (#8634) 2021-08-20 18:41:51 -07:00