sdong
2a6d0cde72
Ignore stale logs while restarting DBs
...
Summary:
Stale log files can be deleted out of order. This can happen for various reasons. One of the reason is that no data is ever inserted to a column family and we have an optimization to update its log number, but not all the old log files are cleaned up (the case shown in the unit tests added). It can also happen when we simply delete multiple log files out of order.
This causes data corruption because we simply increase seqID after processing the next row and we may end up with writing data with smaller seqID than what is already flushed to memtables.
In DB recovery, for the oldest files we are replaying, if there it contains no data for any column family, we ignore the sequence IDs in the file.
Test Plan: Add two unit tests that fail without the fix.
Reviewers: IslamAbdelRahman, igor, yiwu
Reviewed By: yiwu
Subscribers: hermanlee4, yoshinorim, leveldb, andrewkr, dhruba
Differential Revision: https://reviews.facebook.net/D60891
2016-07-25 11:47:31 -07:00
..
2016-07-07 11:35:40 -07:00
2016-05-20 07:42:18 -07:00
2016-02-22 21:32:19 -08:00
2016-05-17 13:11:56 -07:00
2016-05-17 13:11:56 -07:00
2016-04-27 17:36:03 -07:00
2016-07-20 09:49:03 -07:00
2016-07-25 11:47:31 -07:00
2016-07-05 18:11:25 -07:00
2016-07-05 18:11:25 -07:00
2016-02-22 13:54:58 -08:00
2016-04-26 14:22:07 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-07-20 09:49:03 -07:00
2016-07-20 09:49:03 -07:00
2016-04-19 22:54:24 -07:00
2016-07-05 18:11:25 -07:00
2016-05-17 13:11:56 -07:00
2016-05-17 13:11:56 -07:00
2016-05-23 15:55:29 -07:00
2016-06-27 15:19:27 -07:00
2016-05-17 13:11:56 -07:00
2016-06-21 17:57:59 -07:00
2016-06-21 17:57:59 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-04-28 17:50:58 -07:00
2016-02-09 15:12:00 -08:00
2016-06-13 11:34:16 -07:00
2016-06-17 10:30:47 -07:00
2016-03-31 17:12:18 -07:00
2016-07-07 11:29:14 -07:00
2016-05-26 10:13:24 -07:00
2016-06-09 19:03:10 -07:00
2016-07-21 14:32:12 -07:00
2016-07-11 10:43:12 -07:00
2016-05-17 13:11:56 -07:00
2016-05-23 15:55:29 -07:00
2016-03-02 16:23:59 -08:00
2016-02-09 15:12:00 -08:00
2016-07-25 11:47:31 -07:00
2016-07-21 16:29:06 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-03-31 17:12:18 -07:00
2016-05-18 17:09:20 -07:00
2016-07-20 09:49:03 -07:00
2016-07-20 09:49:03 -07:00
2016-04-26 12:41:07 -07:00
2016-07-20 15:28:04 -07:00
2016-02-09 15:12:00 -08:00
2016-07-12 15:30:38 -07:00
2016-07-12 14:15:32 -07:00
2016-07-20 15:28:04 -07:00
2016-07-19 15:46:20 -07:00
2016-03-04 18:15:29 -08:00
2016-07-20 11:23:31 -07:00
2016-07-20 09:49:03 -07:00
2016-07-20 09:49:03 -07:00
2016-07-20 09:49:03 -07:00
2016-06-27 15:19:27 -07:00
2016-07-05 18:11:25 -07:00
2016-04-25 23:02:14 -07:00
2016-02-09 15:12:00 -08:00
2016-07-12 14:15:32 -07:00
2016-07-05 11:57:14 -07:00
2016-04-29 11:35:00 -07:00
2016-04-29 11:35:00 -07:00
2016-02-09 15:12:00 -08:00
2016-05-10 14:06:07 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-07-21 16:29:06 -07:00
2016-07-21 16:29:06 -07:00
2016-07-21 16:29:06 -07:00
2016-07-08 17:50:51 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-03-04 18:15:29 -08:00
2016-03-02 16:23:59 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-06-16 16:21:41 -07:00
2016-06-16 16:21:41 -07:00
2016-07-06 14:29:18 -07:00
2016-06-02 11:57:31 -07:00
2016-02-09 15:12:00 -08:00
2016-07-08 17:50:51 -07:00
2016-05-22 22:00:15 -07:00
2016-05-22 22:00:15 -07:00
2016-02-09 15:12:00 -08:00
2016-07-21 16:29:06 -07:00
2016-03-16 22:57:57 +01:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-07-13 19:33:57 -07:00
2016-07-05 18:11:25 -07:00
2016-07-05 18:11:25 -07:00
2016-07-21 10:10:41 -07:00
2016-05-10 14:06:07 -07:00
2016-07-20 09:49:03 -07:00
2016-07-19 18:10:18 -07:00
2016-07-05 18:11:25 -07:00
2016-07-20 09:49:03 -07:00
2016-02-09 15:12:00 -08:00
2016-07-20 09:49:03 -07:00
2016-07-20 09:49:03 -07:00
2016-07-20 09:49:03 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-04-26 14:22:07 -07:00
2016-07-20 09:49:03 -07:00
2016-07-20 11:23:31 -07:00
2016-06-10 12:12:10 -07:00
2016-06-24 16:29:43 -07:00
2016-07-05 18:11:25 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-07-20 11:23:31 -07:00
2016-07-20 11:23:31 -07:00
2016-07-19 09:44:03 -07:00
2016-05-19 14:24:48 -07:00
2016-05-19 14:24:48 -07:00
2016-05-20 07:42:18 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-07-20 11:23:31 -07:00
2016-07-20 11:23:31 -07:00
2016-02-09 15:12:00 -08:00
2016-07-12 14:15:32 -07:00
2016-07-13 15:36:22 -07:00
2016-02-09 15:12:00 -08:00
2016-07-20 11:23:31 -07:00
2016-07-05 18:11:25 -07:00
2016-07-05 18:11:25 -07:00
2016-03-30 23:05:22 +05:30
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-07-25 11:47:31 -07:00
2016-07-05 18:11:25 -07:00
2016-07-25 11:47:31 -07:00
2016-04-18 10:18:41 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-06-25 08:29:40 +01:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00