Repository navigation
Messaging: configurable topic sample count with bounded polling - #39888
Khairajani wants to merge 5 commits into
Conversation
…ithin a bound Add sampleDataCount (default 10, 1-1000) to the messaging metadata pipeline. Kafka/Redpanda count only decoded messages against it, skipping consumer errors, poll exceptions, tombstones and undecodable payloads, within the 10-second per-topic deadline and after 3 consecutive poll failures. Kinesis passes Limit, reads further shards to reach the count, and follows at most 5 pages per shard. NATS samples the configured count and widens its scan window with it.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
|
Local Java test run: PASSED — details
Tests run locally
Broader coverage not executed by this focused run
Why these tests
Commandsmvn -B verify -pl :openmetadata-integration-tests -am -DskipBootJar=true -Pmysql-elasticsearch -DintegrationTests.lane=parallel -Dit.test=IngestionPipelineResourceIT -Dfailsafe.failIfNoSpecifiedTests=false -Dtest=NoUnitTestsInThisRun -Dsurefire.failIfNoSpecifiedTests=false |
Code Review ✅ Approved 🟡 Medium risk 1 closed / 1 findingsConfigurable per-topic sampling changes broker reads and stored samples; requesting up to 1,000 messages could increase ingestion work. Adds a configurable ✅ 1 closed✅ Edge Case: Kinesis drops a shard's earlier pages when a later get_records fails
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Fixes open-metadata/openmetadata-collate#8191
Topic sample data in the messaging metadata workflow now samples a configurable number of messages, and every source stops at a defined bound.
sampleDataCounton the messaging metadata pipeline: default 10 (the old fixed sample), 1–1000."None"before) and undecodable payloads are skipped. The 10s polling deadline per topic stays, and sampling stops after 3 consecutive poll exceptions.get_recordscall passesLimit. Sampling continues across shards until the count is met and follows at most 5 pages per shard. Before this, one call could return up to 10k records, and sampling stopped after the first shard.max(100, 2 × count).sampleDataCount.ADR:2026-12-05-messaging-sample-data-counts-decoded-messages-within-a-per-topic-bound.Type of change:
High-level design:
N/A: an additive schema field with a default that keeps current behaviour. The bounds are in the decision record.
Tests:
Which test layer and why
Python unit tests. The consumer, Kinesis and NATS clients are scripted, so the counts and bounds are checked without a broker.
Use cases covered
Unit tests
ingestion/tests/unit/source/messaging/test_sample_count.py(25 tests).main's source and this schema, 13 of the first 24 fail on behaviour (short samples,"None"tombstones, 50 Kinesis records instead of 10). The 25th, added after review, failed on the previous commit: a throttled second page dropped the shard's first page. All 25 pass on this branch.tests/unit/source/messaging/andtests/unit/sampler/.Backend integration tests
IngestionPipelineResourceITbecause it stores pipeline configs: 278 run, 0 failures, 28 skipped (mysql-elasticsearch).Local Java test run: PASSED
c12f52cf8e01(baseorigin/main)--scope full).Ingestion integration tests
Playwright (UI) tests
Manual testing performed
None beyond the tests above.
UI screen recording:
Not applicable: an ingestion setting rendered automatically from the schema, with no UI code change.
Checklist:
docs/decisions/2026-12-05-messaging-sample-data-counts-decoded-messages-within-a-per-topic-bound.md.🤖 Generated with Claude Code