Indexer copes with out-of-order system-times from the tx-log, fixes #3864 #3876
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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-txinstead, or look up the transaction in thext.txstable.This also brings another couple of breaking changes:
after-tx(taking the tx) ->after-tx-id(taking just the transaction ID)at-txno longer defaultsafter-tx-idif the latter is not provided, nor does XTDB implicitly await theat-tx- if there is a chance that the transaction passed toat-txhasn't been indexed yet, users should additionally provideafter-tx-id:basisarguments have been moved out of their nested:basismap 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-tzalso does, as well as (more bluntly!) flags like:explain?.resolves #3864