Skip to content

Retroactively modifiying end valid time not working #1444

Answered by refset
lgrapenthin asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, this is the expected behaviour. For context you may want to look through #444 and #326

Essentially what happens is that the second transaction "resumes" the history of whatever the previous value would have been, after the new end-valid-time terminates. I think to achieve the behaviour you are looking for, you simply need to add a :crux.tx/delete operation to the transaction:

(crux/submit-tx my-node [[:crux.tx/put
                                {:crux.db/id :test1
                                 :some-data "foo"}
                                #inst"2021-02-28T10:08:52.075-00:00"
                                ;; now invalid one second later
                                #inst"2…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lgrapenthin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1442 on February 28, 2021 16:37.