Skip to content

Conversation

@jarohen
Copy link
Member

@jarohen jarohen commented Nov 15, 2024

Four very distinct commits here - overall, we now cope with out-of-order system-times from the tx-log by recording the maximum of the time received from the log and the previous tx-time + 1µs.

The main user-visible impact of this is that submit-tx no longer returns the whole transaction key, because the system-time of the transaction isn't finalised until the transaction is indexed - users that require the system-time should either call execute-tx instead, or look up the transaction in the xt.txs table.

This also brings another couple of breaking changes:

  • query options: after-tx (taking the tx) -> after-tx-id (taking just the transaction ID)
  • at-tx no longer defaults after-tx-id if the latter is not provided, nor does XTDB implicitly await the at-tx - if there is a chance that the transaction passed to at-tx hasn't been indexed yet, users should additionally provide after-tx-id
  • loosely related: the :basis arguments have been moved out of their nested :basis map to the top-level of the query options. The (my) previous argument that these are the only options that affect query repeatability isn't correct - default-tz also does, as well as (more bluntly!) flags like :explain?.

resolves #3864

@jarohen jarohen self-assigned this Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cope with incoming system-time decreasing

1 participant