Moving updated-at timestamps to unique millisecond times#17489
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 570c19eb46
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
I have read the CLA Document and I hereby sign the CLA |
jif-oai
left a comment
There was a problem hiding this comment.
Going to ms feels a bit like a hack to me (as it's still not a perfect guarantee) but I guess in this case this is more than enough
Also, this won't fix the backward compatibility case
ca63d3a to
b21b0bd
Compare
jif-oai
left a comment
There was a problem hiding this comment.
Can you revert all the unrelated changes or move them to a dedicated PR?
To allow the ability to have guaranteed-unique cursors, we make two important updates: * Move updated-at timestamps from second to millisecond * Guarantee uniqueness -- if multiple items are inserted at the same millisecond, bump the new one by one millisecond until it becomes unique This lets us use single-number cursors for forwards and backwards paging through resultsets and guarantee that the cursor is a fixed point to do (timestamp > cursor) and get new items only
b21b0bd to
93a1d5f
Compare
To allow the ability to have guaranteed-unique cursors, we make two important updates:
This lets us use single-number cursors for forwards and backwards paging through resultsets and guarantee that the cursor is a fixed point to do (timestamp > cursor) and get new items only.
This updated implementation is backwards-compatible since multiple appservers can be running and won't handle the previous method well.