Commit 147e2c5
committed
kafka: skip input step hashing below exactly-once fault tolerance
The Kafka input connector hashed every parsed row into a per-partition
step hash on its poller threads, at every fault-tolerance level. The
hash is only ever read when a step is replayed, and replay requires
exactly-once fault tolerance, so every pipeline below that level
computed the hash and threw it away. For rows with VARIANT columns the
hash walked every nested map on the hot path. The other transports
(file, url, s3, nexmark) already skip hashing when the consumer
reports that the pipeline cannot replay.
Create the hasher only when the pipeline runs with exactly-once fault
tolerance, and report each step through Resume::new_metadata_only:
Replay with the hash under exactly-once, Seek otherwise. Seek still
carries the partition offsets, so suspend and resume from a checkpoint
work unchanged.
On a benchmark that ingests 5 million JSON records into a table with
six VARIANT columns (16 partitions, 8 poller threads, fault tolerance
off), steady-state ingest rises from 108k to 161k records per second,
and the hash disappears from the profile, where it had been the
largest single item on the poller threads.
Signed-off-by: Gerd Zellweger <mail@gerdzellweger.com>1 parent c94d447 commit 147e2c5
1 file changed
Lines changed: 23 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
539 | | - | |
| 539 | + | |
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
545 | | - | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
546 | 549 | | |
547 | 550 | | |
548 | 551 | | |
549 | 552 | | |
550 | 553 | | |
551 | | - | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
552 | 559 | | |
553 | 560 | | |
554 | 561 | | |
| |||
558 | 565 | | |
559 | 566 | | |
560 | 567 | | |
561 | | - | |
| 568 | + | |
562 | 569 | | |
563 | 570 | | |
564 | 571 | | |
| |||
576 | 583 | | |
577 | 584 | | |
578 | 585 | | |
579 | | - | |
| 586 | + | |
580 | 587 | | |
581 | 588 | | |
582 | 589 | | |
| |||
600 | 607 | | |
601 | 608 | | |
602 | 609 | | |
603 | | - | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
604 | 613 | | |
605 | 614 | | |
606 | 615 | | |
| |||
620 | 629 | | |
621 | 630 | | |
622 | 631 | | |
623 | | - | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
624 | 639 | | |
625 | 640 | | |
626 | 641 | | |
| |||
640 | 655 | | |
641 | 656 | | |
642 | 657 | | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
| 658 | + | |
648 | 659 | | |
649 | 660 | | |
650 | 661 | | |
| |||
0 commit comments