Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Test compaction filter #323

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

hicqu
Copy link
Contributor

@hicqu hicqu commented Nov 12, 2020

What problem does this PR solve?

Add a test case for gc in compaction filter.

What is changed and how does it work?

Check List

Tests

Code changes

  • Has Go code change

Side effects

Related changes

Does this PR introduce a user-facing change?:

No.

NONE

Signed-off-by: qupeng <qupeng@pingcap.com>
Signed-off-by: qupeng <qupeng@pingcap.com>
Signed-off-by: qupeng <qupeng@pingcap.com>
@cosven
Copy link
Contributor

cosven commented Dec 25, 2020

Case 2 fails sometimes

2020/12/25 07:35:13 control.go:348: [info] begin to set up database
2020/12/25 07:35:13 control.go:350: [info] begin to set up database on  127.0.0.1:2379
2020/12/25 07:35:13 control.go:350: [info] begin to set up database on  127.0.0.1:4000
2020/12/25 07:35:13 control.go:350: [info] begin to set up database on  127.0.0.1:20160
2020/12/25 07:35:13 control.go:371: [info] begin to set up client
2020/12/25 07:35:13 control.go:374: [info] begin to set up db client for node  127.0.0.1:4000
2020/12/25 07:35:13 main.go:67: [info] [gc-in-compaction-filter] connnecting to tidb root@tcp(127.0.0.1:4000)/...
[2020/12/25 07:35:13.545 +00:00] [INFO] [client.go:125] ["[pd] create pd client with endpoints"] [pd-address="[127.0.0.1:2379]"]
[2020/12/25 07:35:13.549 +00:00] [INFO] [client.go:227] ["[pd] switch leader"] [new-leader=http://127.0.0.1:2379] [old-leader=]
[2020/12/25 07:35:13.549 +00:00] [INFO] [client.go:144] ["[pd] init cluster id"] [cluster-id=6910086940565119238]
2020/12/25 07:35:13 panic_check.go:34: [warning] plugin panic check won't work
2020/12/25 07:35:13 control.go:298: [info] run client 0...
2020/12/25 07:35:13 cases.go:39: [info] [gc-in-compaction-filter] load safe point 421758520118738944
2020/12/25 07:35:18 cases.go:39: [info] [gc-in-compaction-filter] load safe point 421758520118738944
2020/12/25 07:35:23 cases.go:163: [fatal] [gc-in-compaction-filter] the latest version before safe point is cleaned

Case 1 also fails sometimes
image

log.Fatalf("[%s] change gc.ratio-threshold fail, error %v", caseLabel, err)
}

key := append([]byte("test_gc_stale_versions"), genRandomBytes(8)...)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The newKey and oldKey may share the same memory.

[2021/01/06 03:37:02.672 +00:00] [INFO] [client.go:144] ["[pd] init cluster id"] [cluster-id=6914281661887352089]
2021/01/06 03:37:02 panic_check.go:34: [warning] plugin panic check won't work
2021/01/06 03:37:02 control.go:298: [info] run client 0...
2021/01/06 03:37:02 cases.go:41: [info] [gc-in-compaction-filter] load safe point 422026530736570368
2021/01/06 03:37:07 cases.go:138: [fatal] [gc-in-compaction-filter] stale version is not cleaned

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants