Skip to content

cancel the workload script cause the resolved-ts spike #3971

@3AceShowHand

Description

@3AceShowHand
  • run the following scripts with the command ./xxx 20000 0
  • ctrl + c to stop the script
#!/bin/bash

batch_size=$1
sleep_duration=$2

TABLE_NAME="test.bank0"

i=0
while true
do
    sleep "$sleep_duration"

    i=$((i + 1))
    start_ts=$(date +%s%3N)

    mysql -h$HOST -P$PORT -e "DELETE FROM $TABLE_NAME LIMIT $batch_size;"

    end_ts=$(date +%s%3N)
    cost_ms=$((end_ts - start_ts))

    echo "Round $i: delete from $TABLE_NAME finished, cost=${cost_ms} ms"
done

The resolved-ts spikes, and TiKV-CDC endpoint CPU become full

Image Image

This may caused by the stale lock, the resolved-ts drop to 0 after GC

Image

At the same time, the TiKV-CDC endpoint CPU usage is full, this is not expected.

Image Image

tikv:4855bdccc64e7a8551d30ebbbd5be75a42929265

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions