Skip to content
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

Enhancement for ListInDisk #24378

Closed
guo-shaoge opened this issue Apr 29, 2021 · 0 comments · Fixed by #24379
Closed

Enhancement for ListInDisk #24378

guo-shaoge opened this issue Apr 29, 2021 · 0 comments · Fixed by #24379
Labels
sig/execution SIG execution type/enhancement The issue or PR belongs to an enhancement.

Comments

@guo-shaoge
Copy link
Collaborator

guo-shaoge commented Apr 29, 2021

Bug Report

ListInDisk is a temporary storage for operators which need spill data to disk when memory limit is reached.

But there is a limitation of ListIndisk. After the user reads data from ListInDisk, he can no longer write.

That's because for each chunk added into ListInDisk, we try to seperate it as many fixed size segments(1024B), when a segemnt is full, we will compute its checksum and write it to disk. So for the last segment, its length may be samller than 1024.

When we read data in ListInDisk, we will first compute checksum of the last segment and flush it to disk even its length is smaller than 1024. By doing this, the code of ReadAt method will be simple and clean. Because length of the last segment may be smaller than 1024, so we cannot append any data.

1. Minimal reproduce step (Required)

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

@guo-shaoge guo-shaoge added type/enhancement The issue or PR belongs to an enhancement. sig/execution SIG execution labels Apr 29, 2021
@siddontang siddontang changed the title Enhancement for ListInDsik Enhancement for ListInDisk Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant