Kir Kolyshkin
84d802ab7f
journald/read: simplify walking backwards
...
In case Tail=N parameter is requested, we need to show N lines.
It does not make sense to walk backwards one by one if we can
do it at once. Now, if Since=T is also provided, make sure we
haven't jumped too far (before T), and if we did, move forward.
The primary motivation for this was to make the code simpler.
This also fixes a tiny bug in the "since" implementation.
Before this commit:
> $ docker logs -t --tail=6000 --since="2019-03-10T03:54:25.00" $ID | head
> 2019-03-10T03:54:24.999821000Z 95981
After:
> $ docker logs -t --tail=6000 --since="2019-03-10T03:54:25.00" $ID | head
> 2019-03-10T03:54:25.000013000Z 95982
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com >
(cherry picked from commit ff3cd167ea4d089b7695a263ba2fc4caa0a0750c)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com >
Upstream-commit: 2a124db7da440f1efd4c2957320d8b25d9d9ce36
Component: engine
2019-08-09 16:41:49 -07:00
..
2018-06-15 16:03:33 -07:00
2019-08-08 04:14:12 +02:00
2018-09-21 17:06:25 -07:00
2018-06-13 09:04:30 +02:00
2018-02-05 16:51:57 -05:00
2019-06-18 13:38:50 +01:00
2019-08-06 12:04:23 -07:00
2019-04-17 21:32:23 +02:00
2018-08-13 21:59:11 -07:00
2018-02-05 16:51:57 -05:00
2018-05-23 21:57:30 +02:00
2019-08-09 16:41:49 -07:00
2018-02-05 16:51:57 -05:00
2018-08-20 15:28:15 -05:00
2019-08-01 15:09:40 -07:00
2017-09-06 12:05:19 -04:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-08-13 21:59:11 -07:00
2018-02-05 16:51:57 -05:00
2018-08-13 21:59:11 -07:00
2018-04-19 06:35:54 -04:00
2018-02-05 16:51:57 -05:00
2019-06-18 14:44:15 +01:00
2018-09-06 18:39:22 -07:00
2018-04-23 13:52:44 -07:00
2018-02-05 16:51:57 -05:00
2018-02-09 11:24:09 -08:00
2018-02-05 16:51:57 -05:00
2018-06-27 17:11:29 -07:00
2018-02-26 16:48:29 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-16 11:25:14 -05:00
2018-02-05 16:51:57 -05:00
2019-06-04 15:21:22 -07:00
2019-06-04 15:21:22 -07:00
2019-08-07 20:45:19 +02:00
2018-06-13 09:04:30 +02:00
2018-02-05 16:51:57 -05:00
2018-04-19 06:35:54 -04:00
2018-06-13 09:04:30 +02:00
2019-06-18 13:38:50 +01:00
2019-06-18 13:38:50 +01:00
2018-08-13 21:59:11 -07:00
2019-04-17 23:08:54 +02:00
2018-07-26 11:17:56 -07:00
2018-08-13 21:59:11 -07:00
2019-05-21 12:12:48 +02:00
2019-05-21 12:12:48 +02:00
2018-07-26 11:17:56 -07:00
2018-02-05 16:51:57 -05:00
2019-02-11 22:12:52 +01:00
2019-06-20 11:23:45 +02:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-06-13 09:04:30 +02:00
2018-05-25 14:21:07 -04:00
2018-02-05 16:51:57 -05:00
2018-05-25 14:21:07 -04:00
2018-05-25 14:21:07 -04:00
2018-02-05 16:51:57 -05:00
2018-02-21 18:26:16 -05:00
2018-06-13 09:04:30 +02:00
2018-03-02 14:05:36 +01:00
2018-02-05 16:51:57 -05:00
2019-03-26 12:37:59 +01:00
2019-06-03 18:55:00 +02:00
2018-02-05 16:51:57 -05:00
2018-04-23 13:52:44 -07:00
2018-10-04 21:20:54 +02:00
2018-06-13 09:04:30 +02:00
2018-10-05 12:35:59 +02:00
2018-08-21 11:36:15 +02:00
2018-10-12 02:26:17 +02:00
2018-02-05 16:51:57 -05:00
2018-06-13 09:04:30 +02:00
2018-02-05 16:51:57 -05:00
2018-05-25 14:21:07 -04:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-07-11 15:51:51 +02:00
2018-08-17 17:05:21 -07:00
2018-08-17 17:05:21 -07:00
2018-02-05 16:51:57 -05:00
2018-08-29 12:54:06 +02:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-08-29 12:54:06 +02:00
2018-08-17 09:36:56 -07:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-09-06 18:39:22 -07:00
2018-05-25 15:18:53 -04:00
2018-02-05 16:51:57 -05:00
2018-05-30 15:22:10 -04:00
2019-03-26 14:17:52 +01:00
2018-05-25 14:21:07 -04:00
2019-06-18 13:38:50 +01:00
2018-08-20 18:55:01 +00:00
2018-08-13 21:59:11 -07:00
2018-08-13 21:59:11 -07:00
2018-06-15 16:14:17 -07:00
2018-06-15 16:14:17 -07:00
2018-02-05 16:51:57 -05:00
2018-06-27 17:11:29 -07:00
2018-06-13 09:04:30 +02:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-09-04 15:01:46 +00:00
2018-02-05 16:51:57 -05:00
2018-06-13 09:04:30 +02:00
2018-06-08 11:07:48 +08:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-06-08 19:19:06 -07:00
2018-02-05 16:51:57 -05:00
2019-06-04 15:21:22 -07:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-04-23 13:52:44 -07:00
2018-05-03 10:04:33 -07:00
2018-02-05 16:51:57 -05:00
2018-05-24 18:24:36 -07:00
2018-02-05 16:51:57 -05:00
2018-06-13 09:04:30 +02:00
2018-09-18 12:34:56 +02:00
2018-07-11 15:51:51 +02:00
2018-05-23 17:50:54 +02:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-06-08 11:07:48 +08:00
2018-02-07 14:27:09 -05:00
2018-08-09 00:45:00 +09:00
2018-04-19 06:35:54 -04:00
2018-04-19 06:35:54 -04:00
2018-08-13 21:59:11 -07:00
2018-08-13 21:59:11 -07:00
2018-08-30 17:34:59 -07:00
2018-04-23 13:52:44 -07:00
2018-08-13 21:59:11 -07:00