xtdb

Arek 2026-02-13T21:11:20.129069Z

Hi, Maybe I'm missing something in the docs, but is there a way to abort a fact from the future/remove a transaction in XTDB? For example let's say we have an RTS game: - We have a level 2 base. - We want to upgrade it to level 3 and the upgrade takes 2 minutes. - We set :building/level to 3 with :valid-from to now + 2min (we'd need to recall this time later, so let's call it foo). - We aborted the upgrade and ideally want to remove the transaction from the database. Technically, we can set :building/level back to 2 with :valid-from set to foo, but... - Suppose our base gets attacked in the meantime. - The base is damaged and downgraded to level 1, so we set :building/level to 1 with valid-time set to now which could be before foo. - At time foo, our base magically reverts to level 2, which is not what we want. I hope the example describes the problem clearly. How to handle such cases where we want to override/delete updates made earlier?

refset 2026-03-02T10:08:35.259579Z

Hey @aciep sorry for only just responding to this! Love the RTS example 😄 in general I would say you always always want to make changes over explicit valid time bounds (if you're going to make such changes at all), so it would be best to first query for the whole range of future versions and update the entire range as an atomic set of changes. In SQL, you can do DELETE FROM building FOR PORTION OF VALID_TIME ... - see https://docs.xtdb.com/reference/main/sql/txs.html#delete