Retroactively modifiying end valid time not working #1444
Answered
by
refset
lgrapenthin
asked this question in
Q&A
-
|
Beta Was this translation helpful? Give feedback.
Answered by
refset
Feb 28, 2021
Replies: 1 comment
-
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/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"2021-02-28T10:08:53.075-00:00"]
[:crux.tx/delete
:test1
;; delete from one second later until the end of time
#inst"2021-02-28T10:08:53.075-00:00"
(Date. Long.MAX_VALUE)]]) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
lgrapenthin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: