-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rfc: Resolved-ts for Large Transactions #114
base: master
Are you sure you want to change the base?
Conversation
bc2bfc0
to
6d84526
Compare
Signed-off-by: ekexium <[email protected]>
6d84526
to
93f799e
Compare
Signed-off-by: ekexium <[email protected]>
7938582
to
4fa64e3
Compare
Signed-off-by: ekexium <[email protected]>
6b03fb1
to
813b856
Compare
|
||
*TBD: should it also update max_ts?* | ||
|
||
#### TiKV txn_status_cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it mean that it requires all information about these large txns must exist in the cache? If so, I'm afraid it's no longer a cache as literal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cache operates on a "best effort" basis rather than being mandatory. In the case of cache miss, the system falls back to use start_ts.
…me discussions Signed-off-by: ekexium <[email protected]>
#### 3.2.1 Coordinator | ||
|
||
**Proposed Change:** | ||
- TTL manager fetches latest TSO as min_commit_ts candidate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the TTL manager
the worker in tidb which updates the TTL of primary key for each transaction?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, because we want to piggyback the min_commit_ts
in the heartbeat message.
|
||
## 5. Cost Analysis | ||
|
||
- Memory: ~33 bytes per cache entry. TiKV instances can hold millions of entries. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IS it 33 bytes for each transaction? Why 33 bytes total?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. The minimum memory requirement for each cache entry is 33:
8 (start_ts) + 8 (min_commit_ts) + 1 (status) + 8 (TTL) = 33 bytes.
I've clarified this in the doc.
Signed-off-by: ekexium <[email protected]>
- The TTL manager goroutine fetches latest TSO as min_commit_ts candidate. | ||
- Updates committer's inner state and PK in TiKV. | ||
- PK update piggybacked on `heartbeat` request. | ||
- Broadcasts `start_ts` and new `min_commit_ts` to all TiKV stores. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will there be kvproto changes like adding new KV interfaces?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to describe it in the document.
Signed-off-by: ekexium <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: ekexium <[email protected]>
Signed-off-by: ekexium <[email protected]>
No description provided.