Skip to content

Commit b69302c

Browse files
committed
[DOCS] Document update anomaly for tables with LATENESS and PRIMARY KEY
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
1 parent 42b5ec8 commit b69302c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs.feldera.com/docs/tutorials/time-series.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,20 @@ which will only be garbage collected if at least one of the PK columns has a `LA
3535

3636
:::
3737

38+
:::warning
39+
40+
Feldera implements an `INSERT` or `UPDATE` in a table with a primary
41+
key as a pair of `INSERT` and `DELETE` operations: a new record is
42+
inserted, and the old record with the same primary key (if present) is
43+
deleted. For tables with `LATENESS` this may cause surprising
44+
effects: the `DELETE` needs to delete the previous version of the
45+
record, with the old timestamp; if this timestamp is behind the
46+
`LATENESS` threshold, the entire INSERT or UPDATE is considered late
47+
and is thus ignored. This effectivelly means that "old" records in
48+
such a table can never be updated or deleted.
49+
50+
:::
51+
3852
Users can further take advantage of `LATENESS` annotations to control
3953
**when** the output of a query is produced by Feldera using
4054
[`emit_final`](#emitting-final-values-of-a-view-with-emit_final)

0 commit comments

Comments
 (0)