-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Sequence table GC speed is slower than user write, and which have conflict when user write and gc #50194
Comments
Hello, I am Blathers. I am here to help you get the issue triaged. Hoot - a bug! Though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here. I have CC'd a few people who may be able to assist you:
If we have not gotten back to your issue within a few business days, you can try the following:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
@ajwerner |
@ajwerner
By the way, this is not the main problem I care, because I think this is not the reason about conflict.
|
@ajwerner
|
@ajwerner
but the newest(v20.1) code like this:
I not sure, whether the conflict is this code cause, v19.1 not declare the span with key's timestamp, Why AddMVCC use header.Timestamp(this is replica clock now()), why not use key.Timestamp to AddMVCC()???
|
Relates to #42780. |
@ajwerner |
I think you are correct that the implementation of Lines 3225 to 3230 in a72689b
I'm going to move this to the storage team's backlog. |
FWIW I got nerd sniped by this. A couple of fixes inbound. I've got some fixes that should make this not a problem anymore.
|
We need to be careful about this. Historically, adding many range tombstones was very bad for performance. I think we resolved most (all?) of those issues, but I'm still nervous about embracing using range tombstones below the level of a Range. |
Ack. I typed up the change in two parts. I'll split it up. Addressing 1. is certainly worth it. I can understand being hesitant about 2. |
We can litigate the value of 2. with more caution and scrutiny. |
Agreed. |
I’m leaving this open for more discussion about #51230. |
Describe the problem
I see GC use reverse iterator in newest version, it is wonderful for sequence table.
I merge this PR to v19.1, this very good, OOM never occur.
But, I found another problem, gc default timeout is 1 min, the replica enqueue 7-10 min per time.
sequence table have 1k-2k update per second, but GC can reduce sequence table MVCC key 500/s, run 1min can reduce 30k MVCC key. The reslut is GC is slower than user write when table use Sequence table.
I change the GC queue default to dynamic, hope to GC sequence MVCC key frequently.
But I found there have a conflict between GC Sequence table MVCC key and user write record when primary key is auto_increment, the insert performance is reduce too big when GC Sequence table MVCC key.
Is there any methods to avoid the conflict???
To Reproduce
table primary key is auto_increment, and use Sequence table.
table insert 60 million record.
Sequence table have 40 million MVCC values.
change GC sequence default timeout from 1min to 1hour.
Expected behavior
you will find insert performance is reduce too big when GC Sequence table MVCC key.
Additional data / screenshots
Environment:
cockroach sql
, JDBC, ...]The text was updated successfully, but these errors were encountered: