Repository navigation
fix: carry instant temporal updates and destroys into later versions - #916
hoanle0126 wants to merge 1 commit into
Conversation
|
@hoanle0126 thanks for this. The carry follows ash-project/ash#3104's rule on every history I generated against it, atomic and non-atomic, and the changes to the range path leave every range write I test unchanged. I'd like to hold it until the fix for ash-project/ash#3104 settles in core. Carrying a value forward can produce a version that would be refused if it were written directly. Here, an identity breach is refused by the exclusion constraint, with "has already been taken", but an update that's valid at Two parts of this PR also differ from ash-project/ash#3107, and I've raised both on ash-project/ash#3104 so the rule says which:
|
|
Thanks @matt-beanland! Holding this until I've also updated |
Closes #915
Companion to ash-project/ash#3107
Summary
__keys,__cand,__locked,__conflict) for instant-as_ofwrites inAshPostgres.Temporalto lock all slices overlapping[as_of, ∞)in deterministic(<pk>, lower(valid_at))order.__afterand__stopsusinglag(...)window functions, carrying each changed attribute forward in__carryacross contiguous later slices until that attribute was changed by a later write or a validity gap occurs (and restampingrecorded_aton carried slices).upsert_group/9.__carryup to the first validity gap while leaving range-as_ofupdates and destroys unchanged.test/temporal_test.exsfor instant updates, non-atomic updates, bulk atomic updates, matched upserts,x -> y -> xtransitions, independent multi-column stops, atomic expression evaluation, validity gaps, future-scheduled versions,recorded_atrestamping, and contiguous instant destroys.