ridiculousfish
162053ed8d
Make history file rewriting be more lock savvy
...
We now are stingier with taking history file locks - if the lock
is held too long we may just break it. But the current file save
architecture holds the lock for the duration of the save. It also
has some not-quite-right checks that can cause spurious failures in
the history stress test.
Reimplement the history save to retry. Rather than holding the lock,
rewrite the file to a temporary location and then take the lock. If
the history file has changed, start all over.
This is going to be slower under contention, but the advantage is that
the lock is only held for a brief period (stat + rename) rather than
across calls to write().
Some updated logic also fixes spurious failures that were easy to observe
when tsan was enabled. These failures were due to failing to check if the
file at the path was the same file we opened.
The next step is to move the history file saving to a background thread
to reduce the chances of it impacting user's typing.
2017-02-06 11:04:07 -08:00
..
2017-01-29 21:34:30 -08:00
2017-01-29 21:34:30 -08:00
2017-01-29 18:15:38 -08:00
2016-04-26 21:58:59 -07:00
2017-01-09 11:21:34 -08:00
2016-04-26 21:58:59 -07:00
2017-01-23 09:28:34 -08:00
2016-04-26 21:58:59 -07:00
2016-12-24 12:15:28 -08:00
2016-04-26 21:58:59 -07:00
2017-01-26 20:05:46 -08:00
2016-04-26 21:58:59 -07:00
2016-11-25 18:52:15 -08:00
2016-04-26 21:58:59 -07:00
2017-01-21 15:47:12 -08:00
2016-04-26 21:58:59 -07:00
2017-01-26 20:05:46 -08:00
2016-04-26 21:58:59 -07:00
2016-11-25 18:52:15 -08:00
2016-04-26 21:58:59 -07:00
2017-02-05 02:49:45 -08:00
2016-11-22 16:18:20 -08:00
2016-07-24 17:02:29 -07:00
2017-01-26 20:05:46 -08:00
2017-01-29 19:33:30 -08:00
2017-01-29 18:15:38 -08:00
2017-01-29 18:56:55 -08:00
2016-12-20 17:16:08 -08:00
2017-01-30 13:41:17 -08:00
2017-01-26 20:05:46 -08:00
2017-02-05 18:31:14 -08:00
2017-01-26 20:05:46 -08:00
2017-01-26 20:05:46 -08:00
2017-01-21 16:48:07 -08:00
2017-01-26 20:05:46 -08:00
2016-06-23 17:26:08 -07:00
2017-01-26 20:05:46 -08:00
2016-06-23 17:26:08 -07:00
2017-01-26 20:05:46 -08:00
2017-01-08 22:18:27 -08:00
2017-01-03 16:14:42 -08:00
2017-01-13 20:48:55 -08:00
2017-02-06 11:04:07 -08:00
2016-04-30 19:52:13 -07:00
2016-04-30 19:52:13 -07:00
2017-01-14 20:51:54 -08:00
2017-01-29 18:56:55 -08:00
2017-01-20 21:48:41 -08:00
2017-01-26 16:14:50 -08:00
2017-01-26 09:40:17 -08:00
2017-02-06 11:04:07 -08:00
2017-02-06 11:04:07 -08:00
2017-01-21 17:15:45 -08:00
2017-01-26 20:05:46 -08:00
2017-02-05 02:49:45 -08:00
2016-06-23 17:26:08 -07:00
2017-01-29 21:19:39 -08:00
2016-05-01 20:28:46 -07:00
2017-01-22 00:44:04 -08:00
2017-01-22 00:44:04 -08:00
2017-01-29 21:06:46 -08:00
2017-01-26 20:05:46 -08:00
2016-05-29 22:24:29 -07:00
2016-05-01 22:18:59 -07:00
2017-01-30 12:59:01 -08:00
2017-01-26 20:05:46 -08:00
2016-07-24 17:56:34 -07:00
2017-01-26 17:33:48 -08:00
2016-12-03 20:12:53 -08:00
2017-01-03 16:14:42 -08:00
2017-01-26 20:05:46 -08:00
2017-01-26 15:43:46 -08:00
2017-01-03 16:14:42 -08:00
2016-11-11 18:56:56 -08:00
2017-01-26 20:05:46 -08:00
2017-01-26 20:05:46 -08:00
2017-01-26 17:33:48 -08:00
2016-06-23 17:26:08 -07:00
2016-05-27 14:44:30 -07:00
2016-06-23 17:26:08 -07:00
2017-01-26 20:05:46 -08:00
2017-01-26 20:05:46 -08:00
2017-01-26 16:14:50 -08:00
2016-06-23 17:26:08 -07:00
2017-01-26 15:06:58 -08:00
2016-12-14 20:12:37 -08:00
2016-10-22 19:09:40 -07:00
2016-05-02 22:07:58 -07:00
2017-01-29 18:15:38 -08:00
2017-01-26 15:06:58 -08:00
2017-01-26 20:05:46 -08:00
2017-01-24 15:24:13 -08:00
2017-01-24 15:24:13 -08:00
2017-01-24 15:24:13 -08:00
2017-02-05 18:31:14 -08:00
2017-02-05 18:31:14 -08:00
2017-01-21 14:07:54 -08:00
2017-01-14 20:51:54 -08:00
2017-01-26 16:14:50 -08:00
2016-06-23 17:26:08 -07:00
2016-10-29 19:01:19 -07:00
2016-05-26 20:24:03 -07:00
2016-11-25 18:52:15 -08:00
2016-05-03 16:09:45 -07:00
2016-05-27 14:44:30 -07:00
2016-06-05 21:32:57 -07:00
2016-10-31 13:29:10 -07:00
2016-06-12 11:34:35 -07:00
2016-12-03 20:12:53 -08:00
2016-06-23 17:26:08 -07:00
2017-02-06 10:01:33 -08:00
2016-12-20 16:40:12 -08:00