Add new metric ingest/rows/published to fix flaky KinesisFaultToleranceTest#19177
Open
kfaraz wants to merge 6 commits intoapache:masterfrom
Open
Add new metric ingest/rows/published to fix flaky KinesisFaultToleranceTest#19177kfaraz wants to merge 6 commits intoapache:masterfrom
ingest/rows/published to fix flaky KinesisFaultToleranceTest#19177kfaraz wants to merge 6 commits intoapache:masterfrom
Conversation
KinesisFaultToleranceTestingest/rows/published to fix flaky KinesisFaultToleranceTest
gianm
reviewed
Mar 19, 2026
Contributor
gianm
left a comment
There was a problem hiding this comment.
Please add the metric to processing/src/main/resources/defaultMetrics.json, processing/src/test/resources/defaultMetrics.json, extensions-contrib/prometheus-emitter/src/main/resources/defaultMetrics.json, and extensions-contrib/statsd-emitter/src/main/resources/defaultMetricDimensions.json.
| .map(DataSegment::getTotalRows) | ||
| .filter(Objects::nonNull) | ||
| .mapToInt(Integer::intValue) | ||
| .sum(); |
Contributor
There was a problem hiding this comment.
A single batch ingest could publish more than 2 billion rows, please make this a long sum.
kfaraz
commented
Mar 20, 2026
| @@ -1 +1,250 @@ | |||
| {"compact/segmentAnalyzer/fetchAndProcessMillis":[],"compact/task/count":[],"compactTask/availableSlot/count":[],"compactTask/maxSlot/count":[],"coordinator/global/time":[],"coordinator/time":[],"groupBy/maxMergeDictionarySize":[],"groupBy/maxSpilledBytes":[],"groupBy/mergeDictionarySize":[],"groupBy/spilledBytes":[],"groupBy/spilledQueries":[],"ingest/count":[],"ingest/events/duplicate":[],"ingest/events/messageGap":[],"ingest/events/processed":[],"ingest/events/processedWithError":[],"ingest/events/thrownAway":[],"ingest/events/unparseable":[],"ingest/handoff/count":[],"ingest/handoff/failed":[],"ingest/handoff/time":[],"ingest/input/bytes":[],"ingest/kafka/avgLag":[],"ingest/kafka/lag":[],"ingest/kafka/maxLag":[],"ingest/kafka/partitionLag":[],"ingest/merge/cpu":[],"ingest/merge/time":[],"ingest/notices/queueSize":[],"ingest/notices/time":[],"ingest/pause/time":[],"ingest/persists/backPressure":[],"ingest/persists/count":[],"ingest/persists/cpu":[],"ingest/persists/failed":[],"ingest/persists/time":[],"ingest/rows/output":[],"ingest/segments/count":[],"ingest/sink/count":[],"ingest/tombstones/count":[],"interval/compacted/count":[],"interval/skipCompact/count":[],"interval/waitCompact/count":[],"jetty/numOpenConnections":[],"jetty/threadPool/busy":[],"jetty/threadPool/idle":[],"jetty/threadPool/isLowOnThreads":[],"jetty/threadPool/max":[],"jetty/threadPool/min":[],"jetty/threadPool/queueSize":[],"jetty/threadPool/ready":[],"jetty/threadPool/total":[],"jetty/threadPool/utilizationRate":[],"jetty/threadPool/utilized":[],"jvm/bufferpool/capacity":[],"jvm/bufferpool/count":[],"jvm/bufferpool/used":[],"jvm/gc/count":[],"jvm/gc/cpu":[],"jvm/mem/committed":[],"jvm/mem/init":[],"jvm/mem/max":[],"jvm/mem/used":[],"jvm/pool/committed":[],"jvm/pool/init":[],"jvm/pool/max":[],"jvm/pool/used":[],"kafka/consumer/bytesConsumed":[],"kafka/consumer/fetch":[],"kafka/consumer/fetchLatencyAvg":[],"kafka/consumer/fetchLatencyMax":[],"kafka/consumer/fetchRate":[],"kafka/consumer/fetchSizeAvg":[],"kafka/consumer/fetchSizeMax":[],"kafka/consumer/incomingBytes":[],"kafka/consumer/outgoingBytes":[],"kafka/consumer/recordsConsumed":[],"kafka/consumer/recordsLag":[],"kafka/consumer/recordsPerRequestAvg":[],"kill/eligibleUnusedSegments/count":[],"kill/pendingSegments/count":[],"kill/task/count":[],"killTask/availableSlot/count":[],"killTask/maxSlot/count":[],"mergeBuffer/acquisitionTimeNs":[],"mergeBuffer/maxAcquisitionTimeNs":[],"mergeBuffer/pendingRequests":[],"mergeBuffer/queries":[],"mergeBuffer/used":[],"metadata/kill/audit/count":[],"metadata/kill/compaction/count":[],"metadata/kill/datasource/count":[],"metadata/kill/rule/count":[],"metadata/kill/supervisor/count":[],"metadatacache/backfill/count":[],"metadatacache/init/time":[],"metadatacache/refresh/count":[],"metadatacache/refresh/time":[],"metadatacache/schemaPoll/count":[],"metadatacache/schemaPoll/failed":[],"metadatacache/schemaPoll/time":[],"query/bytes":[],"query/cache/delta/averageBytes":[],"query/cache/delta/errors":[],"query/cache/delta/evictions":[],"query/cache/delta/hitRate":[],"query/cache/delta/hits":[],"query/cache/delta/misses":[],"query/cache/delta/numEntries":[],"query/cache/delta/put/error":[],"query/cache/delta/put/ok":[],"query/cache/delta/put/oversized":[],"query/cache/delta/sizeBytes":[],"query/cache/delta/timeouts":[],"query/cache/total/averageBytes":[],"query/cache/total/errors":[],"query/cache/total/evictions":[],"query/cache/total/hitRate":[],"query/cache/total/hits":[],"query/cache/total/misses":[],"query/cache/total/numEntries":[],"query/cache/total/put/error":[],"query/cache/total/put/ok":[],"query/cache/total/put/oversized":[],"query/cache/total/sizeBytes":[],"query/cache/total/timeouts":[],"query/count":[],"query/cpu/time":[],"query/failed/count":[],"query/interrupted/count":[],"query/node/bytes":[],"query/node/time":[],"query/node/ttfb":[],"query/segment/time":[],"query/segmentAndCache/time":[],"query/success/count":[],"query/time":[],"query/timeout/count":[],"query/wait/time":[],"schemacache/finalizedSchemaPayload/count":[],"schemacache/finalizedSegmentMetadata/count":[],"schemacache/inTransitSMQPublishedResults/count":[],"schemacache/inTransitSMQResults/count":[],"schemacache/realtime/count":[],"segment/added/bytes":[],"segment/assignSkipped/count":[],"segment/assigned/count":[],"segment/availableDeepStorageOnly/count":[],"segment/compacted/bytes":[],"segment/compacted/count":[],"segment/count":[],"segment/deleted/count":[],"segment/dropQueue/count":[],"segment/dropSkipped/count":[],"segment/dropped/count":[],"segment/loadQueue/assigned":[],"segment/loadQueue/cancelled":[],"segment/loadQueue/count":[],"segment/loadQueue/failed":[],"segment/loadQueue/size":[],"segment/loadQueue/success":[],"segment/max":[],"segment/moveSkipped/count":[],"segment/moved/bytes":[],"segment/moved/count":[],"segment/nuked/bytes":[],"segment/overShadowed/count":[],"segment/pendingDelete":[],"segment/scan/active":[],"segment/scan/pending":[],"segment/size":[],"segment/skipCompact/bytes":[],"segment/skipCompact/count":[],"segment/unavailable/count":[],"segment/underReplicated/count":[],"segment/unneeded/count":[],"segment/unneededEternityTombstone/count":[],"segment/used":[],"segment/usedPercent":[],"segment/waitCompact/bytes":[],"segment/waitCompact/count":[],"serverview/init/time":[],"serverview/sync/healthy":[],"serverview/sync/unstableTime":[],"service/heartbeat":[],"sqlQuery/bytes":[],"sqlQuery/planningTimeMs":[],"sqlQuery/time":[],"sys/cpu":[],"sys/disk/queue":[],"sys/disk/read/count":[],"sys/disk/read/size":[],"sys/disk/transferTime":[],"sys/disk/write/count":[],"sys/disk/write/size":[],"sys/fs/files/count":[],"sys/fs/files/free":[],"sys/fs/max":[],"sys/fs/used":[],"sys/mem/free":[],"sys/mem/max":[],"sys/mem/used":[],"sys/net/read/dropped":[],"sys/net/read/errors":[],"sys/net/read/packets":[],"sys/net/read/size":[],"sys/net/write/collisions":[],"sys/net/write/errors":[],"sys/net/write/packets":[],"sys/net/write/size":[],"sys/storage/used":[],"sys/swap/free":[],"sys/swap/max":[],"sys/swap/pageIn":[],"sys/swap/pageOut":[],"sys/tcpv4/activeOpens":[],"sys/tcpv4/attemptFails":[],"sys/tcpv4/estabResets":[],"sys/tcpv4/in/errs":[],"sys/tcpv4/in/segs":[],"sys/tcpv4/out/rsts":[],"sys/tcpv4/out/segs":[],"sys/tcpv4/passiveOpens":[],"sys/tcpv4/retrans/segs":[],"sys/uptime":[],"task/action/batch/attempts":[],"task/action/batch/queueTime":[],"task/action/batch/runTime":[],"task/action/batch/size":[],"task/action/failed/count":[],"task/action/run/time":[],"task/action/success/count":[],"task/autoScaler/requiredCount":[],"task/failed/count":[],"task/pending/count":[],"task/pending/time":[],"task/run/time":[],"task/running/count":[],"task/segmentAvailability/wait/time":[],"task/success/count":[],"task/waiting/count":[],"tier/historical/count":[],"tier/replication/factor":[],"tier/required/capacity":[],"tier/total/capacity":[],"zk/connected":[],"zk/reconnect/time":[]} | |||
Contributor
Author
There was a problem hiding this comment.
Reformatted this file so that future diffs are cleaner.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
KinesisFaultToleranceTest.test_supervisorRecovers_afterChangeInTopicPartitions()has been flaky due to discrepancy in the number of records ingested:Failure report
The root cause seems to be the failure of tasks that were in progress when the partition count changed.
Since these tasks fail, some records are re-ingested by the supervisor thereby increasing the number of times the metric
ingest/events/processedis emitted.Also, this metric only indicates that the records have been processed, not that they have been published.
Changes
ingest/rows/publishedprocessing/src/test/resources/defaultMetrics.jsonto avoid confusing diffs later.Release note
Emit new metric
ingest/rows/publishedfrom all task types to denote the total row count of successfully published segments.This PR has: