Andrew Kryczka
4708a6875c
Repair DBs with trailing slash in name
...
Summary:
Problem:
- `DB::SanitizeOptions` strips trailing slash from `wal_dir` but not `dbname`
- We check whether `wal_dir` and `dbname` refer to the same directory using string equality: https://github.com/facebook/rocksdb/blob/master/db/repair.cc#L258
- Providing `dbname` with trailing slash causes default `wal_dir` to be misidentified as a separate directory.
- Then the repair tries to add all SST files to the `VersionEdit` twice (once for `dbname` dir, once for `wal_dir`) and fails with coredump.
Solution:
- Add a new `Env` function, `AreFilesSame`, which uses device and inode number to check whether files are the same. It's currently only implemented in `PosixEnv`.
- Migrate repair to use `AreFilesSame` to check whether `dbname` and `wal_dir` are same. If unsupported, falls back to string comparison.
Closes https://github.com/facebook/rocksdb/pull/2827
Differential Revision: D5761349
Pulled By: ajkr
fbshipit-source-id: c839d548678b742af1166d60b09abd94e5476238
2017-09-22 12:42:22 -07:00
..
2017-07-21 18:26:26 -07:00
2017-07-15 16:11:23 -07:00
2017-09-14 14:18:59 -07:00
2017-09-14 14:18:59 -07:00
2017-07-21 18:26:26 -07:00
2017-09-07 18:26:18 -07:00
2017-07-15 16:11:23 -07:00
2017-07-21 18:26:26 -07:00
2017-07-15 16:11:23 -07:00
2017-07-21 18:26:26 -07:00
2017-08-19 14:10:08 -07:00
2017-08-16 23:42:00 -07:00
2017-08-19 14:10:08 -07:00
2017-07-21 18:26:26 -07:00
2017-07-21 18:26:26 -07:00
2017-07-15 16:11:23 -07:00
2017-09-07 14:28:06 -07:00
2017-07-15 16:11:23 -07:00
2017-07-26 12:12:26 -07:00
2017-08-16 18:42:33 -07:00
2017-07-15 16:11:23 -07:00
2017-09-21 15:57:58 -07:00
2017-09-13 15:41:38 -07:00
2017-08-15 13:02:19 -07:00
2017-07-15 16:11:23 -07:00
2017-07-21 18:26:26 -07:00
2017-08-09 15:58:13 -07:00
2017-08-11 12:29:14 -07:00
2017-07-15 16:11:23 -07:00
2017-08-23 19:40:47 -07:00
2017-07-21 18:26:26 -07:00
2017-07-21 18:26:26 -07:00
2017-07-21 18:26:26 -07:00
2017-09-13 15:41:38 -07:00
2017-07-21 18:26:26 -07:00
2017-07-15 16:11:23 -07:00
2017-07-18 11:56:57 -07:00
2017-07-21 18:26:26 -07:00
2017-09-15 11:56:31 -07:00
2017-08-03 15:43:29 -07:00
2017-09-12 17:17:42 -07:00
2017-09-07 14:28:06 -07:00
2017-09-18 14:45:08 -07:00
2017-07-24 10:54:37 -07:00
2017-07-21 18:26:26 -07:00
2017-09-18 14:45:08 -07:00
2017-09-19 12:01:09 -07:00
2017-09-18 14:45:08 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-26 21:11:47 -07:00
2017-07-24 10:54:37 -07:00
2017-09-14 17:57:31 -07:00
2017-07-24 10:54:37 -07:00
2017-08-18 11:43:33 -07:00
2017-07-15 16:11:23 -07:00
2017-07-21 18:26:26 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-21 18:26:26 -07:00
2017-08-29 18:41:35 -07:00
2017-07-21 18:26:26 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-21 18:26:26 -07:00
2017-09-11 09:14:48 -07:00
2017-08-31 14:16:30 -07:00
2017-07-21 18:26:26 -07:00
2017-09-12 11:26:47 -07:00
2017-08-16 18:42:33 -07:00
2017-09-15 17:15:10 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-09-14 15:41:49 -07:00
2017-09-14 15:41:49 -07:00
2017-07-21 18:26:26 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-28 16:27:16 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-21 18:26:26 -07:00
2017-07-21 18:26:26 -07:00
2017-07-21 18:26:26 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-09-21 17:56:38 -07:00
2017-07-21 18:26:26 -07:00
2017-09-07 18:26:18 -07:00
2017-09-07 18:26:18 -07:00
2017-07-15 16:11:23 -07:00
2017-07-21 18:26:26 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-21 18:26:26 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-21 18:26:26 -07:00
2017-07-15 16:11:23 -07:00
2017-09-11 09:14:48 -07:00
2017-09-11 09:14:48 -07:00
2017-09-12 12:02:53 -07:00
2017-09-11 09:14:48 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-08-16 23:42:00 -07:00
2017-08-16 23:42:00 -07:00
2017-07-15 16:11:23 -07:00
2017-07-21 18:26:26 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-21 18:26:26 -07:00
2017-07-21 18:26:26 -07:00
2017-07-15 16:11:23 -07:00
2017-09-14 15:41:49 -07:00
2017-09-14 15:41:49 -07:00
2017-09-11 09:14:48 -07:00
2017-09-22 12:42:22 -07:00
2017-09-22 12:42:22 -07:00
2017-07-15 16:11:23 -07:00
2017-08-26 01:00:38 -07:00
2017-07-31 12:12:03 -07:00
2017-07-15 16:11:23 -07:00
2017-07-21 18:26:26 -07:00
2017-07-21 18:26:26 -07:00
2017-07-21 18:26:26 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-08-24 16:10:54 -07:00
2017-08-24 16:10:54 -07:00
2017-07-15 16:11:23 -07:00
2017-07-21 18:26:26 -07:00
2017-07-15 16:11:23 -07:00
2017-07-21 18:26:26 -07:00
2017-09-12 17:17:42 -07:00
2017-09-11 09:14:48 -07:00
2017-07-21 18:26:26 -07:00
2017-07-28 16:27:16 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-09-18 14:45:08 -07:00
2017-09-18 14:45:08 -07:00
2017-09-18 14:45:08 -07:00
2017-09-12 14:58:46 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-08-03 10:43:28 -07:00
2017-08-09 22:57:01 -07:00