Not seeing the QLDB history reflecting all updates being made to a single document.
When running multiple updates to a single document within a single execution of the QLDB console, only the last update is recorded in the history.
However, when running the multiple updates in separate executions, all the updates are recorded in the history.
An example when running queries directly in the QLDB console:
Setup:
CREATE TABLE T;
CREATE INDEX ON T (uid);
INSERT INTO T VALUE
{
'status' : 'NEW',
'uid' : '1401149b-a7ea-4f17-bebc-7cbe48847cde'
};
Then when executing multiple update statements sequentially in the console in a single execution:
UPDATE T SET status = 'IN_PROGRESS' WHERE uid = '1401149b-a7ea-4f17-bebc-7cbe48847cde';
UPDATE T SET status = 'COMPLETED' WHERE uid = '1401149b-a7ea-4f17-bebc-7cbe48847cde';
The history only shows 2 document versions, with the latest version (version: 1) having status: COMPLETED:
select * from history(T) AS h where h.data.uid = '1401149b-a7ea-4f17-bebc-7cbe48847cde';
Note, the history does record all 3 versions when running the update statements one at a time in separate executions.