debezium / debezium/dbz

FinishPartitionWatchDog consuming high CPU [DBZ-6230]

Open
#784 0 comments 0 reactions 0 assignees View on GitHub
component/spanner-connector migrated-from-jira type/enhancement
Dominant language
HTML
Stars
6
Forks
8
Avg merge
2d 19h
Merged PRs (30d)
1

Description

Migrated from [DBZ-6230](https://issues.redhat.com/browse/DBZ-6230)

h2. What Debezium connector do you use and what version?

v2.2.0.Alpha1
h2. What is the connector configuration?

{"name": "livestream-connector","config":

{ "connector.class": "io.debezium.connector.spanner.SpannerConnector", "tasks.max": "1", "gcp.spanner.change.stream": "live-table", "gcp.spanner.project.id": "project-stag, "gcp.spanner.instance.id": "development-instance", "gcp.spanner.database.id": "live-db", "gcp.spanner.credentials.path": "/app/services-sa.json", "key.converter.schemas.enable":false, "value.converter.schemas.enable":false }

}
h2. What is the captured database version and mode of deployment?

GCP Managed Spanner DB and Kafka connect deployed on K8s.
h2. What behaviour do you expect?

Less CPU usage.
h2. What behaviour do you see?

High CPU usage. Related [thread|https://debezium.zulipchat.com/#narrow/stream/302529-users/topic/High.20CPU.20consumption.20in.20Spanner.20debezium] on zulip.

!https://issues.redhat.com/secure/temporaryattachment/1232fddd0af50208bb83185b550701cdba5e52c8/temp4978268862975678595_image-2023-03-19-11-21-01-268.png|width=919,height=493!
h2. Do you see the same behaviour using the latest relesead Debezium version?

Yes.
h2. Do you have the connector logs, ideally from start till finish?

Yes.
h2. How to reproduce the issue using our [tutorial|https://github.com/debezium/debezium-examples/tree/main/tutorial] deployment?

Reproducible with normal config.
h1. Feature request or enhancement
h2. Which use case/requirement will be addressed by the proposed feature?

Less CPU usage
h2. Implementation ideas (optional)

Increase sleep time or subscribe to finishedPartition changes rather than polling it [here|https://github.com/debezium/debezium-connector-spanner/blob/ed4fe34fe887e9f5304a40d6d74b2bdf2879f06a/src/main/java/io/debezium/connector/spanner/FinishPartitionWatchDog.java#L35].

Contributor guide

Open the contributing guide

Research direction

Start with src/main/java/io/debezium/connector/spanner/FinishPartitionWatchDog.java, especially the polling logic at the linked line. Reproduce the high CPU behavior with the normal Spanner connector configuration and compare CPU usage while checking that finished-partition handling still works. Done means materially lower CPU usage without losing watchdog behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
google-cloud, java
Domain
backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.