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
..
2021-09-07 11:13:56 -07:00
2021-09-07 11:31:59 -07:00
2021-09-07 11:31:59 -07:00
2021-06-16 16:51:38 -07:00
2021-06-16 16:51:38 -07:00
2021-07-02 05:23:02 -07:00
2021-06-18 04:57:27 -07:00
2021-08-20 18:00:16 -07:00
2021-08-20 18:00:16 -07:00
2021-06-15 03:43:48 -07:00
2021-09-01 14:28:58 -07:00
2021-08-02 18:12:11 -07:00
2021-03-29 17:10:42 -07:00
2020-10-28 23:22:27 -07:00
2021-05-05 14:00:17 -07:00
2021-06-15 03:43:48 -07:00
2021-09-01 14:28:58 -07:00
2021-09-07 13:05:23 -07:00
2021-08-20 20:40:48 -07:00
2021-07-23 08:38:45 -07:00
2021-07-23 08:38:45 -07:00
2021-08-09 12:51:14 -07:00
2021-07-23 08:38:45 -07:00
2021-07-23 08:38:45 -07:00
2021-07-29 11:51:08 -07:00
2021-08-18 17:40:01 -07:00
2021-07-30 12:16:44 -07:00
2020-06-15 10:47:02 -07:00
2021-07-23 08:38:45 -07:00
2021-07-23 08:38:45 -07:00
2021-05-05 14:00:17 -07:00
2021-09-01 14:28:58 -07:00
2021-06-16 16:51:38 -07:00
2021-06-16 16:51:38 -07:00
2021-07-23 08:38:45 -07:00
2021-07-23 08:38:45 -07:00
2021-08-10 11:10:07 -07:00
2020-12-09 21:21:16 -08:00
2021-07-23 08:38:45 -07:00
2021-07-23 08:38:45 -07:00
2021-07-23 08:38:45 -07:00
2021-07-23 08:38:45 -07:00
2021-07-23 08:38:45 -07:00
2021-07-27 21:32:11 -07:00
2021-08-24 18:18:36 -07:00
2021-08-20 11:41:14 -07:00
2021-07-23 08:38:45 -07:00
2021-07-23 08:38:45 -07:00
2021-07-23 08:38:45 -07:00
2021-09-01 14:28:58 -07:00
2021-09-01 14:28:58 -07:00
2021-08-16 08:10:32 -07:00
2021-09-07 11:31:59 -07:00
2021-07-23 08:38:45 -07:00
2021-07-23 08:38:45 -07:00
2021-07-07 11:14:05 -07:00
2021-07-23 08:38:45 -07:00
2021-07-23 08:38:45 -07:00
2021-07-23 08:38:45 -07:00
2020-10-28 23:22:27 -07:00
2021-09-01 14:28:58 -07:00
2021-03-25 21:18:08 -07:00
2021-07-23 08:38:45 -07:00
2021-09-01 14:28:58 -07:00
2021-07-29 11:51:08 -07:00
2021-03-25 21:18:08 -07:00
2021-08-20 20:40:48 -07:00
2020-08-25 10:46:11 -07:00
2020-02-20 12:09:57 -08:00
2021-07-23 08:38:45 -07:00
2021-05-18 19:33:55 -07:00
2021-03-15 04:34:11 -07:00
2021-07-23 08:38:45 -07:00
2020-12-22 23:45:58 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-10-28 23:22:27 -07:00
2021-08-03 13:31:10 -07:00
2021-08-18 17:40:01 -07:00
2021-08-18 17:40:01 -07:00
2020-02-20 12:09:57 -08:00
2021-03-19 12:09:47 -07:00
2020-02-20 12:09:57 -08:00
2021-03-25 21:18:08 -07:00
2021-09-07 11:31:59 -07:00
2021-01-25 22:09:11 -08:00
2021-03-15 04:34:11 -07:00
2021-07-23 08:38:45 -07:00
2021-08-24 17:46:14 -07:00
2021-08-15 14:17:45 -07:00
2021-08-23 23:09:17 -07:00
2021-09-07 11:31:59 -07:00
2021-08-03 13:31:10 -07:00
2020-02-20 12:09:57 -08:00
2020-11-30 18:11:38 -08:00
2020-08-26 10:39:20 -07:00
2021-01-04 16:01:01 -08:00
2021-06-25 00:47:17 -07:00
2021-03-19 12:09:47 -07:00
2020-02-20 12:09:57 -08:00
2021-03-19 12:09:47 -07:00
2020-02-20 12:09:57 -08:00
2021-09-07 11:31:59 -07:00
2020-02-20 12:09:57 -08:00
2020-12-22 23:45:58 -08:00
2021-08-03 13:31:10 -07:00
2021-08-13 14:35:41 -07:00
2021-08-13 14:35:41 -07:00
2021-07-22 18:29:13 -07:00
2021-08-10 18:09:03 -07:00
2021-05-10 12:50:25 -07:00
2020-02-20 12:09:57 -08:00
2021-06-24 18:11:30 -07:00
2021-06-24 18:11:30 -07:00
2020-02-20 12:09:57 -08:00
2021-08-30 15:20:41 -07:00
2021-08-05 18:36:16 -07:00
2020-12-23 16:55:53 -08:00
2020-11-10 23:42:13 -08:00
2021-05-19 21:41:31 -07:00
2021-03-15 04:34:11 -07:00
2021-07-23 08:38:45 -07:00
2021-03-15 04:34:11 -07:00
2021-01-25 22:09:11 -08:00
2021-09-07 11:31:59 -07:00
2021-09-01 14:28:58 -07:00
2020-02-20 12:09:57 -08:00
2021-03-15 04:34:11 -07:00
2021-03-15 04:34:11 -07:00
2020-02-20 12:09:57 -08:00
2020-10-28 10:12:58 -07:00
2021-03-25 21:18:08 -07:00
2020-02-20 12:09:57 -08:00
2021-06-18 04:57:27 -07:00
2021-06-18 04:57:27 -07:00
2020-08-14 19:20:58 -07:00
2021-07-28 16:44:14 -07:00
2021-08-18 11:33:03 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2021-03-25 21:18:08 -07:00
2021-07-27 21:49:14 -07:00
2021-07-27 21:49:14 -07:00
2021-05-17 18:28:39 -07:00
2021-03-25 15:00:45 -07:00
2021-07-06 10:14:32 -07:00
2020-12-22 23:45:58 -08:00
2020-08-12 17:31:23 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2021-06-22 09:49:44 -07:00
2021-09-01 14:28:58 -07:00
2021-04-19 11:56:14 -07:00
2021-08-24 18:18:36 -07:00
2021-06-10 12:55:20 -07:00
2021-01-19 19:27:53 -08:00
2021-05-17 15:15:23 -07:00
2021-05-17 15:15:23 -07:00
2021-06-22 09:49:44 -07:00
2021-08-09 12:51:14 -07:00
2021-07-22 18:29:13 -07:00
2020-12-09 16:02:12 -08:00
2020-12-09 16:02:12 -08:00
2020-12-09 16:02:12 -08:00
2021-06-10 11:02:43 -07:00
2021-07-30 12:16:44 -07:00
2021-07-30 12:16:44 -07:00
2020-02-20 12:09:57 -08:00
2021-07-30 12:07:49 -07:00
2021-09-01 14:28:58 -07:00
2021-07-30 12:07:49 -07:00
2021-07-07 11:14:05 -07:00
2020-02-20 12:09:57 -08:00
2021-03-18 09:47:31 -07:00
2021-03-18 09:47:31 -07:00
2021-03-18 09:47:31 -07:00
2021-04-21 13:54:02 -07:00
2021-06-18 17:14:51 -07:00