Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions argo/cron/bank2-compaction-opt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# maintainer: cosven
#
# a workflow for debugging bank2-compaction-opt


metadata:
name: tipocket-bank2-compaction-opt
spec:
schedule: "0 6 * * *"
concurrencyPolicy: "Forbid"
timezone: "Asia/Shanghai"
startingDeadlineSeconds: 0
workflowSpec:
# select the template `main` as the the entrypoint
entrypoint: main
templates:
- name: main
steps:
- - name: call-wait-cluster
templateRef:
name: wait-cluster
template: wait-cluster
arguments:
parameters:
- name: ns
value: "{{workflow.parameters.ns}}"
- - name: call-tipocket-scbank2
templateRef:
# the template `tipocket-scbank2` refers to the argo
# template defined in argo/template/sc_bank2.yaml
name: tipocket-scbank2
template: tipocket-scbank2
arguments:
parameters:
- name: ns
value: tipocket-titan-bank2-compaction
- name: purge
value: "true"
- name: image-version
value: nightly
# NOTE: differenct K8s cluster has different storage-class name
- name: storage-class
value: sas
- name: run-time
value: "6h"
- name: tikv-replicas
value: "5"
- name: tikv-config
value: "/config/tikv/compaction-opt.toml"
- name: namesis
value: "random_kill,partition_one,subcritical_skews,shuffle-leader-scheduler,shuffle-region-scheduler"
- name: tidb-replica-read
value: "leader-and-follower"
50 changes: 50 additions & 0 deletions argo/cron/titan-bank2-compaction-opt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# maintainer: cosven

metadata:
name: tipocket-titan-bank2-compaction-opt
spec:
schedule: "0 6 * * *"
concurrencyPolicy: "Forbid"
timezone: "Asia/Shanghai"
startingDeadlineSeconds: 0
workflowSpec:
# select the template `main` as the the entrypoint
entrypoint: main
templates:
- name: main
steps:
- - name: call-wait-cluster
templateRef:
name: wait-cluster
template: wait-cluster
arguments:
parameters:
- name: ns
value: "{{workflow.parameters.ns}}"
- - name: call-tipocket-scbank2
templateRef:
# the template `tipocket-scbank2` refers to the argo
# template defined in argo/template/sc_bank2.yaml
name: tipocket-scbank2
template: tipocket-scbank2
arguments:
parameters:
- name: ns
value: tipocket-bank2-compaction
- name: purge
value: "true"
- name: image-version
value: nightly
# NOTE: differenct K8s cluster has different storage-class name
- name: storage-class
value: sas
- name: run-time
value: "6h"
- name: tikv-replicas
value: "5"
- name: tikv-config
value: "/config/tikv/titan-compaction-opt.toml"
- name: namesis
value: "random_kill,partition_one,subcritical_skews,shuffle-leader-scheduler,shuffle-region-scheduler"
- name: tidb-replica-read
value: "leader-and-follower"
37 changes: 37 additions & 0 deletions argo/workflow/bank2-compaction-opt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# maintainer: cosven
#
# a workflow for debugging bank2-compaction-opt

metadata:
generateName: tipocket-bank2-compaction-opt-
namespace: argo
spec:
entrypoint: main
templates:
- name: main
steps:
- - name: call-tipocket-scbank2
templateRef:
name: tipocket-scbank2
template: tipocket-scbank2
arguments:
parameters:
- name: ns
value: tipocket-bank2-compaction
# reserve tidb-cluster after test finished
- name: purge
value: "false"
- name: image-version
value: nightly
- name: storage-class
value: local-storage
- name: run-time
value: "2h"
- name: tikv-replicas
value: "5"
- name: tikv-config
value: "/config/tikv/compaction.toml"
- name: namesis
value: "random_kill,partition_one,subcritical_skews,shuffle-leader-scheduler,shuffle-region-scheduler"
- name: tidb-replica-read
value: "leader-and-follower"
22 changes: 22 additions & 0 deletions config/tikv/compaction-opt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# maintainer: cosven

[gc]
enable-compaction-filter = true
compaction-filter-skip-version-check = true

[coprocessor]
consistency-check-method = "mvcc"

[raftstore]
consistency-check-interval = "180s"

[rocksdb]
force-consistency-checks = true

[rocksdb.defaultcf]
enable-compaction-guard = true
target-file-size-base = "128M"

[rocksdb.writecf]
enable-compaction-guard = true
target-file-size-base = "128M"
26 changes: 26 additions & 0 deletions config/tikv/titan-compaction-opt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# maintainer: cosven

[gc]
enable-compaction-filter = true
compaction-filter-skip-version-check = true

[coprocessor]
consistency-check-method = "mvcc"

[raftstore]
consistency-check-interval = "180s"

[rocksdb]
force-consistency-checks = true

[rocksdb.titan]
enabled = true
max-background-gc = 3 # default 1

[rocksdb.defaultcf]
enable-compaction-guard = true
target-file-size-base = "128M" # default 8M

[rocksdb.writecf]
enable-compaction-guard = true
target-file-size-base = "128M"