Skip to content

Commit 02eb9aa

Browse files
committed
Minor edits and add details about search results retention.
1 parent 21e2066 commit 02eb9aa

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

docs/src/user-guide/guides-retention.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ the following definitions:
2020
| $current\_time$ | The time at which the garbage collector is performing a check. |
2121
| $data\_timestamp$ | The end of the time range for the data being evaluated for expiration (e.g., for an archive, this is the timestamp of the most recent log event contained in the archive). |
2222

23-
When the garbage collector wakes up, it will scan for and delete any data that fits the expiry
23+
When the garbage collector wakes up, it will scan for and delete any data that satisfies the expiry
2424
criteria shown in [Figure 1](#figure-1):
2525

2626
(figure-1)=
2727
:::{card}
2828

29-
$$current\_time - data\_timestamp > retention\_period$$
29+
$$is\_expired = (current\_time - data\_timestamp > retention\_period)$$
3030

3131
+++
3232
**Figure 1**: The criteria for determining whether a piece of data has expired and should be
@@ -45,7 +45,7 @@ For example, if...
4545

4646
## Retention settings
4747

48-
There are three settings that affect how CLP's data retention operates:
48+
The following settings affect how CLP's data retention operates:
4949

5050
* [Archive retention period](#archive-retention-period)
5151
* [Search result retention period](#search-result-retention-period)
@@ -107,9 +107,9 @@ For example, let's say:
107107

108108
When the garbage collector runs, it will evaluate the archive's expiry criteria, substituting
109109
$08:00$ for $data\_timestamp$, and $01:01$ for $current\_time$, since $09:01$ AWST = $01:01$ UTC.
110-
The equation then becomes $08:00 < 01:01 - 01:00$, which evaluates to false. Thus, the garbage
111-
collector won't delete the archive; in fact, it won't delete it until $09:01$ UTC, which is 8 hours
112-
later than it should've been deleted.
110+
The equation then becomes $is\_expired = (08:00 < 01:01 - 01:00)$, which evaluates to false. Thus,
111+
the garbage collector won't delete the archive; in fact, it won't delete it until $09:01$ UTC, which
112+
is 8 hours later than it should've been deleted.
113113

114114
Similarly, archives may be deleted prematurely if your log events use timestamps in a time zone that
115115
is behind UTC.
@@ -136,6 +136,19 @@ results_cache:
136136
retention_period: 1440
137137
```
138138

139+
By default, `results_cache.retention_period` is `60`, which means that search results will be
140+
retained for 60 minutes (1 hour).
141+
142+
:::{note}
143+
When a user runs consecutive queries in the webui without refreshing the page, the results of one
144+
query will be deleted when the next query is run. This means that only the results of the last query
145+
in a session are ever retained, and thus subject to the configured retention period.
146+
147+
In a future version of CLP, we may change this behavior so that the results of all queries are
148+
retained until they are either evicted from the results cache, or their retention period expires,
149+
whichever comes first.
150+
:::
151+
139152
#### Search result expiry criteria
140153

141154
For search results, $data\_timestamp$ (in the expiry criteria equation from [Figure 1](#figure-1))
@@ -206,6 +219,6 @@ the point of failure.
206219

207220
:::{note}
208221
During failure recovery, there may be a temporary period during which an archive no longer exists in
209-
the database, but still exists on disk or in object storage. Once recovery is complete, the physical
210-
archive will also be deleted.
222+
the metadata database, but still exists on disk or in object storage. Once recovery is complete, the
223+
physical archive will also be deleted.
211224
:::

0 commit comments

Comments
 (0)