Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] enhancement(sinks clickhouse): support native protocol #14787

Closed

Conversation

caibirdme
Copy link
Contributor

Since this pr is quite big, so I make this pr in advance, and want to get some suggestions from you.

example:

sinks:
  clickhouse:
    endpiont: tcp://username:pwd@localhost:9223?clickhouse_setting_a=x&clickhouse_setting_b=y
    use_native_proto: true
    table_def:
      name: String
      age: UInt8
      hobbies: Array(String)
      meta: Map(String, DateTime64(3,Asia/Shanghai))
  1. add switch in config, thus we can switch between native and http protocol
  2. native_sink.rs and native_service.rs implement a batched sink and tower service to send request to clickhouse
  3. convert.rs converts vector::Value into clickhouse sdk supported Value according to table_def
  4. parse.rs parses table_def into clickhouse sql type

@netlify
Copy link

netlify bot commented Oct 10, 2022

Deploy Preview for vector-project ready!

Name Link
🔨 Latest commit 9b9a1be
🔍 Latest deploy log https://app.netlify.com/sites/vector-project/deploys/635ca3da631e0400088d8393
😎 Deploy Preview https://deploy-preview-14787--vector-project.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions github-actions bot added the domain: sinks Anything related to the Vector's sinks label Oct 10, 2022
Copy link
Contributor

@neuronull neuronull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey thanks for the contribution!!

I left some initial comments below but it looks good overall.

In addition to the below comments, further steps for this PR would be:

  • Adding an integration test
  • Updating the cue docs in website/cue/reference/components/sinks/clickhouse.cue

src/sinks/clickhouse/config.rs Outdated Show resolved Hide resolved
src/sinks/clickhouse/mod.rs Outdated Show resolved Hide resolved
src/sinks/clickhouse/config.rs Outdated Show resolved Hide resolved
src/sinks/clickhouse/convert.rs Outdated Show resolved Hide resolved
src/sinks/clickhouse/native_sink.rs Outdated Show resolved Hide resolved
src/sinks/clickhouse/parse.rs Outdated Show resolved Hide resolved
src/sinks/clickhouse/config.rs Outdated Show resolved Hide resolved
Copy link
Member

@bruceg bruceg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution, @caibirdme The basic form of this looks sound. Props on using nom to parse the type descriptions and the unit tests on that parsing. This will need to be run through fmt and clippy to pass our checks, and I left a number of comments below to possibly tighten up the implementation.

src/sinks/clickhouse/convert.rs Outdated Show resolved Hide resolved
src/sinks/clickhouse/convert.rs Outdated Show resolved Hide resolved
src/sinks/clickhouse/convert.rs Outdated Show resolved Hide resolved
src/sinks/clickhouse/convert.rs Outdated Show resolved Hide resolved
src/sinks/clickhouse/convert.rs Outdated Show resolved Hide resolved
src/sinks/clickhouse/parse.rs Outdated Show resolved Hide resolved
src/sinks/clickhouse/parse.rs Outdated Show resolved Hide resolved
src/sinks/clickhouse/parse.rs Outdated Show resolved Hide resolved
src/sinks/clickhouse/native_sink.rs Outdated Show resolved Hide resolved
src/sinks/clickhouse/native_sink.rs Outdated Show resolved Hide resolved
@netlify
Copy link

netlify bot commented Oct 25, 2022

Deploy Preview for vrl-playground canceled.

Name Link
🔨 Latest commit 9b9a1be
🔍 Latest deploy log https://app.netlify.com/sites/vrl-playground/deploys/635ca3daf0f1680008b08219

@github-actions
Copy link

Soak Test Results

Baseline: 9a7c16a
Comparison: 5c5b9de
Total Vector CPUs: 4

Explanation

A soak test is an integrated performance test for vector in a repeatable rig, with varying configuration for vector. What follows is a statistical summary of a brief vector run for each configuration across SHAs given above. The goal of these tests are to determine, quickly, if vector performance is changed and to what degree by a pull request. Where appropriate units are scaled per-core.

The table below, if present, lists those experiments that have experienced a statistically significant change in their throughput performance between baseline and comparision SHAs, with 90.0% confidence OR have been detected as newly erratic. Negative values mean that baseline is faster, positive comparison. Results that do not exhibit more than a ±8.87% change in mean throughput are discarded. An experiment is erratic if its coefficient of variation is greater than 0.3. The abbreviated table will be omitted if no interesting changes are observed.

No interesting changes in throughput with confidence ≥ 90.00% and absolute Δ mean >= ±8.87%:

Fine details of change detection per experiment.
experiment Δ mean Δ mean % confidence baseline mean baseline stdev baseline stderr baseline outlier % baseline CoV comparison mean comparison stdev comparison stderr comparison outlier % comparison CoV erratic declared erratic
http_text_to_http_json 2.17MiB 5.56 100.00% 39.05MiB 772.21KiB 15.76KiB 0 0.0193095 41.22MiB 720.16KiB 14.7KiB 0 0.0170591 False False
socket_to_socket_blackhole 826.92KiB 3.44 100.00% 23.46MiB 227.51KiB 4.64KiB 0 0.00946694 24.27MiB 572.15KiB 11.68KiB 0 0.0230157 False False
datadog_agent_remap_blackhole 1.69MiB 3.07 100.00% 55.22MiB 4.54MiB 94.66KiB 0 0.0821983 56.92MiB 2.64MiB 55.09KiB 0 0.0463776 False False
syslog_log2metric_humio_metrics 226.36KiB 2.42 100.00% 9.15MiB 230.52KiB 4.7KiB 0 0.0246063 9.37MiB 404.11KiB 8.23KiB 0 0.0421173 False False
splunk_hec_route_s3 439.01KiB 2.18 100.00% 19.69MiB 2.86MiB 59.56KiB 0 0.145239 20.12MiB 2.87MiB 60.06KiB 0 0.142754 False False
syslog_splunk_hec_logs 250.32KiB 1.56 100.00% 15.72MiB 730.94KiB 14.87KiB 0 0.0454011 15.96MiB 471.9KiB 9.64KiB 0 0.0288621 False False
syslog_humio_logs 135.42KiB 0.83 100.00% 15.86MiB 234.17KiB 4.78KiB 0 0.0144157 15.99MiB 265.47KiB 5.43KiB 0 0.016207 False False
syslog_loki 106.24KiB 0.67 100.00% 15.45MiB 150.7KiB 3.09KiB 0 0.00952299 15.55MiB 780.54KiB 15.87KiB 0 0.0489962 False False
datadog_agent_remap_datadog_logs_acks 383.55KiB 0.63 99.86% 59.66MiB 3.6MiB 75.16KiB 0 0.0603134 60.03MiB 4.49MiB 93.37KiB 0 0.0747074 False False
syslog_log2metric_splunk_hec_metrics 70.83KiB 0.44 99.91% 15.72MiB 701.19KiB 14.29KiB 0 0.043557 15.79MiB 775.95KiB 15.82KiB 0 0.0479896 False False
http_pipelines_no_grok_blackhole 27.19KiB 0.25 82.06% 10.56MiB 95.86KiB 1.96KiB 0 0.00886487 10.58MiB 990.66KiB 20.15KiB 0 0.0913849 False False
datadog_agent_remap_datadog_logs 67.44KiB 0.11 53.32% 61.08MiB 1.17MiB 24.56KiB 0 0.0191791 61.14MiB 4.29MiB 89.35KiB 0 0.0701706 False False
http_pipelines_blackhole_acks 680.51B 0.05 22.20% 1.23MiB 96.91KiB 1.97KiB 0 0.0769999 1.23MiB 63.16KiB 1.29KiB 0 0.0501573 False False
splunk_hec_indexer_ack_blackhole 10.18KiB 0.04 33.74% 23.76MiB 824.28KiB 16.77KiB 0 0.0338712 23.77MiB 796.89KiB 16.22KiB 0 0.0327319 False False
syslog_regex_logs2metric_ddmetrics 2.27KiB 0.03 6.46% 7.31MiB 960.95KiB 19.58KiB 0 0.128378 7.31MiB 976.62KiB 19.91KiB 0 0.130432 False False
splunk_hec_to_splunk_hec_logs_noack 6.79KiB 0.03 46.11% 23.83MiB 425.02KiB 8.67KiB 0 0.0174127 23.84MiB 334.71KiB 6.83KiB 0 0.0137091 False False
splunk_hec_to_splunk_hec_logs_acks 2.96KiB 0.01 9.60% 23.75MiB 856.74KiB 17.42KiB 0 0.0352202 23.75MiB 847.43KiB 17.24KiB 0 0.0348332 False False
enterprise_http_to_http -923.12B -0 9.71% 23.85MiB 258.18KiB 5.27KiB 0 0.0105707 23.85MiB 253.29KiB 5.18KiB 0 0.010371 False False
http_to_http_acks -2.51KiB -0.01 0.85% 17.4MiB 8.17MiB 170.91KiB 0 0.469569 17.4MiB 7.8MiB 162.9KiB 0 0.448256 True True
file_to_blackhole -57.96KiB -0.06 44.39% 95.34MiB 3.12MiB 64.59KiB 0 0.0326724 95.28MiB 3.57MiB 74.33KiB 0 0.0374835 False False
http_to_http_json -41.95KiB -0.17 99.71% 23.85MiB 382.17KiB 7.8KiB 0 0.0156472 23.81MiB 574.88KiB 11.73KiB 0 0.0235781 False False
http_to_http_noack -50.49KiB -0.21 96.93% 23.82MiB 604.16KiB 12.35KiB 0 0.0247641 23.77MiB 973.25KiB 19.83KiB 0 0.0399756 False False
fluent_elasticsearch -174.32KiB -0.21 99.99% 79.47MiB 53.63KiB 1.09KiB 0 0.000658822 79.3MiB 2.1MiB 43.16KiB 0 0.0264547 False False
http_pipelines_blackhole -4.88KiB -0.29 94.35% 1.67MiB 58.99KiB 1.2KiB 0 0.0345606 1.66MiB 110.65KiB 2.26KiB 0 0.065012 False False
datadog_agent_remap_blackhole_acks -187.97KiB -0.32 87.97% 56.58MiB 4.61MiB 95.97KiB 0 0.0814598 56.4MiB 3.52MiB 73.67KiB 0 0.0624132 False False

@github-actions
Copy link

Soak Test Results

Baseline: 9a7c16a
Comparison: d8d85b9
Total Vector CPUs: 4

Explanation

A soak test is an integrated performance test for vector in a repeatable rig, with varying configuration for vector. What follows is a statistical summary of a brief vector run for each configuration across SHAs given above. The goal of these tests are to determine, quickly, if vector performance is changed and to what degree by a pull request. Where appropriate units are scaled per-core.

The table below, if present, lists those experiments that have experienced a statistically significant change in their throughput performance between baseline and comparision SHAs, with 90.0% confidence OR have been detected as newly erratic. Negative values mean that baseline is faster, positive comparison. Results that do not exhibit more than a ±8.87% change in mean throughput are discarded. An experiment is erratic if its coefficient of variation is greater than 0.3. The abbreviated table will be omitted if no interesting changes are observed.

No interesting changes in throughput with confidence ≥ 90.00% and absolute Δ mean >= ±8.87%:

Fine details of change detection per experiment.
experiment Δ mean Δ mean % confidence baseline mean baseline stdev baseline stderr baseline outlier % baseline CoV comparison mean comparison stdev comparison stderr comparison outlier % comparison CoV erratic declared erratic
http_text_to_http_json 1.95MiB 4.99 100.00% 39.09MiB 801.65KiB 16.36KiB 0 0.0200226 41.04MiB 722.13KiB 14.75KiB 0 0.0171789 False False
splunk_hec_route_s3 647.89KiB 2.96 100.00% 21.41MiB 2.03MiB 42.3KiB 0 0.0949187 22.04MiB 1.89MiB 39.54KiB 0 0.0858311 False False
socket_to_socket_blackhole 329.34KiB 1.37 100.00% 23.48MiB 272.37KiB 5.56KiB 0 0.0113259 23.8MiB 197.56KiB 4.03KiB 0 0.00810405 False False
syslog_splunk_hec_logs 179.2KiB 1.14 100.00% 15.4MiB 795.63KiB 16.19KiB 0 0.0504419 15.58MiB 754.84KiB 15.37KiB 0 0.0473184 False False
syslog_loki 173.62KiB 1.11 100.00% 15.29MiB 451.7KiB 9.24KiB 0 0.0288486 15.46MiB 795.94KiB 16.18KiB 0 0.0502771 False False
syslog_regex_logs2metric_ddmetrics 66.41KiB 0.85 99.14% 7.66MiB 892.47KiB 18.17KiB 0 0.113735 7.73MiB 860.3KiB 17.53KiB 0 0.108714 False False
syslog_humio_logs 127.46KiB 0.81 100.00% 15.33MiB 224.72KiB 4.59KiB 0 0.0143139 15.45MiB 151.48KiB 3.1KiB 0 0.00957114 False False
datadog_agent_remap_blackhole 325.15KiB 0.58 99.93% 55.15MiB 3.79MiB 79.04KiB 0 0.0687789 55.46MiB 2.55MiB 53.28KiB 0 0.0460121 False False
datadog_agent_remap_blackhole_acks 247.96KiB 0.46 99.39% 52.31MiB 3.66MiB 76.22KiB 0 0.0699786 52.56MiB 2.33MiB 48.73KiB 0 0.0443183 False False
syslog_log2metric_splunk_hec_metrics 72.53KiB 0.44 99.99% 16.01MiB 583.79KiB 11.89KiB 0 0.0356041 16.08MiB 700.14KiB 14.26KiB 0 0.0425121 False False
datadog_agent_remap_datadog_logs_acks 97.86KiB 0.16 64.44% 57.94MiB 2.97MiB 61.98KiB 0 0.0511708 58.03MiB 4.13MiB 85.89KiB 0 0.0710869 False False
datadog_agent_remap_datadog_logs 92.19KiB 0.15 72.45% 60.84MiB 1.17MiB 24.46KiB 0 0.0191706 60.93MiB 3.88MiB 80.9KiB 0 0.0637033 False False
splunk_hec_to_splunk_hec_logs_noack 17.26KiB 0.07 85.70% 23.82MiB 466.18KiB 9.52KiB 0 0.0191071 23.84MiB 340.07KiB 6.94KiB 0 0.0139284 False False
splunk_hec_indexer_ack_blackhole 12.31KiB 0.05 36.74% 23.74MiB 916.01KiB 18.62KiB 0 0.0376723 23.75MiB 874.46KiB 17.79KiB 0 0.0359454 False False
splunk_hec_to_splunk_hec_logs_acks 2.3KiB 0.01 7.38% 23.77MiB 882.84KiB 17.96KiB 0 0.0362686 23.77MiB 841.34KiB 17.12KiB 0 0.0345604 False False
enterprise_http_to_http 830.19B 0 8.82% 23.84MiB 254.15KiB 5.19KiB 0 0.0104064 23.85MiB 252.12KiB 5.16KiB 0 0.0103229 False False
file_to_blackhole -54.6KiB -0.06 39.61% 95.34MiB 3.41MiB 70.69KiB 0 0.0357626 95.28MiB 3.75MiB 77.97KiB 0 0.0393336 False False
http_to_http_json -37.84KiB -0.15 99.43% 23.85MiB 378.98KiB 7.74KiB 0 0.0155161 23.81MiB 552.71KiB 11.29KiB 0 0.0226641 False False
fluent_elasticsearch -172.23KiB -0.21 99.99% 79.47MiB 52.71KiB 1.07KiB 0 0.000647579 79.3MiB 2.15MiB 44.16KiB 0 0.0270474 False False
http_pipelines_blackhole_acks -2.69KiB -0.22 67.95% 1.18MiB 105.63KiB 2.15KiB 0 0.0873545 1.18MiB 80.46KiB 1.64KiB 0 0.0666907 False False
http_to_http_noack -60.63KiB -0.25 99.27% 23.83MiB 512.12KiB 10.47KiB 0 0.0209837 23.77MiB 981.89KiB 20.01KiB 0 0.0403326 False False
http_to_http_acks -58.28KiB -0.33 18.86% 17.37MiB 8.17MiB 170.86KiB 0 0.470201 17.32MiB 8.36MiB 174.61KiB 0 0.482829 True True
http_pipelines_blackhole -11.95KiB -0.71 100.00% 1.64MiB 27.76KiB 580.81B 0 0.0164912 1.63MiB 116.33KiB 2.37KiB 0 0.0696074 False False
syslog_log2metric_humio_metrics -94.81KiB -1 100.00% 9.29MiB 336.12KiB 6.86KiB 0 0.0353268 9.2MiB 557.1KiB 11.34KiB 0 0.0591416 False False
http_pipelines_no_grok_blackhole -107.58KiB -1.02 100.00% 10.29MiB 456.98KiB 9.33KiB 0 0.043357 10.19MiB 1.03MiB 21.44KiB 0 0.101013 False False

@bruceg
Copy link
Member

bruceg commented Oct 25, 2022

Please let us know when this is ready to re-review. This appears to be failing the clippy checks. You can run these in your dev environment with make check-clippy.

@caibirdme
Copy link
Contributor Author

Please let us know when this is ready to re-review. This appears to be failing the clippy checks. You can run these in your dev environment with make check-clippy.

I'll fix all the style issues few in a few hours and comment here, then you can continue re-review

@github-actions
Copy link

Soak Test Results

Baseline: 6cafa53
Comparison: c451d73
Total Vector CPUs: 4

Explanation

A soak test is an integrated performance test for vector in a repeatable rig, with varying configuration for vector. What follows is a statistical summary of a brief vector run for each configuration across SHAs given above. The goal of these tests are to determine, quickly, if vector performance is changed and to what degree by a pull request. Where appropriate units are scaled per-core.

The table below, if present, lists those experiments that have experienced a statistically significant change in their throughput performance between baseline and comparision SHAs, with 90.0% confidence OR have been detected as newly erratic. Negative values mean that baseline is faster, positive comparison. Results that do not exhibit more than a ±8.87% change in mean throughput are discarded. An experiment is erratic if its coefficient of variation is greater than 0.3. The abbreviated table will be omitted if no interesting changes are observed.

No interesting changes in throughput with confidence ≥ 90.00% and absolute Δ mean >= ±8.87%:

Fine details of change detection per experiment.
experiment Δ mean Δ mean % confidence baseline mean baseline stdev baseline stderr baseline outlier % baseline CoV comparison mean comparison stdev comparison stderr comparison outlier % comparison CoV erratic declared erratic
datadog_agent_remap_blackhole_acks 736.18KiB 1.24 100.00% 58.11MiB 4.13MiB 86.0KiB 0 0.0710796 58.83MiB 2.85MiB 59.68KiB 0 0.04851 False False
socket_to_socket_blackhole 286.12KiB 1.18 100.00% 23.64MiB 158.75KiB 3.24KiB 0 0.00655621 23.92MiB 240.1KiB 4.9KiB 0 0.00979976 False False
datadog_agent_remap_blackhole 489.6KiB 0.86 100.00% 55.42MiB 3.96MiB 82.51KiB 0 0.0714278 55.9MiB 2.98MiB 62.24KiB 0 0.0533417 False False
http_pipelines_blackhole_acks 8.86KiB 0.7 99.67% 1.23MiB 117.18KiB 2.38KiB 0 0.0930716 1.24MiB 90.31KiB 1.84KiB 0 0.0712302 False False
syslog_regex_logs2metric_ddmetrics 24.14KiB 0.31 63.60% 7.54MiB 931.14KiB 18.96KiB 0 0.120651 7.56MiB 914.02KiB 18.64KiB 0 0.118064 False False
http_to_http_acks 43.06KiB 0.24 14.23% 17.22MiB 8.17MiB 170.79KiB 0 0.474297 17.27MiB 8.1MiB 168.89KiB 0 0.469026 True True
http_pipelines_blackhole 3.06KiB 0.18 82.88% 1.68MiB 11.73KiB 245.67B 0 0.00680662 1.69MiB 108.91KiB 2.22KiB 0 0.0630669 False False
splunk_hec_to_splunk_hec_logs_acks 27.41KiB 0.11 75.30% 23.75MiB 865.74KiB 17.61KiB 0 0.0355853 23.78MiB 776.74KiB 15.82KiB 0 0.0318911 False False
splunk_hec_to_splunk_hec_logs_noack 23.37KiB 0.1 93.79% 23.82MiB 512.4KiB 10.46KiB 0 0.0210064 23.84MiB 337.81KiB 6.9KiB 0 0.0138356 False False
splunk_hec_indexer_ack_blackhole 22.45KiB 0.09 62.01% 23.74MiB 925.09KiB 18.81KiB 0 0.0380499 23.76MiB 851.09KiB 17.32KiB 0 0.0349736 False False
enterprise_http_to_http -2.07KiB -0.01 21.33% 23.85MiB 268.41KiB 5.48KiB 0 0.010989 23.85MiB 259.85KiB 5.31KiB 0 0.0106392 False False
file_to_blackhole -87.96KiB -0.09 55.34% 95.34MiB 3.67MiB 76.17KiB 0 0.0385351 95.25MiB 4.18MiB 86.91KiB 0 0.0439091 False False
http_to_http_json -35.84KiB -0.15 99.16% 23.84MiB 372.06KiB 7.59KiB 0 0.0152349 23.81MiB 552.04KiB 11.27KiB 0 0.022638 False False
fluent_elasticsearch -132.51KiB -0.16 100.00% 79.47MiB 51.77KiB 1.05KiB 0 0.000636071 79.34MiB 1.14MiB 23.55KiB 0 0.0144205 False False
splunk_hec_route_s3 -58.34KiB -0.26 68.08% 21.72MiB 2.01MiB 41.83KiB 0 0.0924704 21.66MiB 1.96MiB 40.98KiB 0 0.0903942 False False
http_to_http_noack -94.91KiB -0.39 99.99% 23.84MiB 412.03KiB 8.43KiB 0 0.0168767 23.74MiB 1.1MiB 22.94KiB 0 0.0463355 False False
datadog_agent_remap_datadog_logs_acks -525.69KiB -0.84 100.00% 61.19MiB 3.51MiB 73.36KiB 0 0.0574112 60.68MiB 4.32MiB 89.99KiB 0 0.0712301 False False
syslog_splunk_hec_logs -143.51KiB -0.88 100.00% 16.0MiB 673.39KiB 13.72KiB 0 0.0411034 15.86MiB 638.09KiB 13.0KiB 0 0.0392931 False False
syslog_humio_logs -187.93KiB -1.15 100.00% 15.92MiB 289.39KiB 5.91KiB 0 0.0177495 15.74MiB 309.33KiB 6.33KiB 0 0.0191939 False False
datadog_agent_remap_datadog_logs -838.85KiB -1.35 100.00% 60.84MiB 270.23KiB 5.54KiB 0 0.00433659 60.02MiB 3.92MiB 81.73KiB 0 0.0653623 False False
http_pipelines_no_grok_blackhole -145.6KiB -1.36 100.00% 10.45MiB 234.51KiB 4.79KiB 0 0.0219036 10.31MiB 1.05MiB 21.88KiB 0 0.101889 False False
syslog_log2metric_humio_metrics -138.86KiB -1.39 100.00% 9.78MiB 153.75KiB 3.14KiB 0 0.0153515 9.64MiB 261.49KiB 5.33KiB 0 0.0264774 False False
http_text_to_http_json -632.08KiB -1.53 100.00% 40.37MiB 862.12KiB 17.6KiB 0 0.0208496 39.75MiB 903.49KiB 18.44KiB 0 0.0221894 False False
syslog_log2metric_splunk_hec_metrics -260.37KiB -1.58 100.00% 16.07MiB 621.82KiB 12.68KiB 0 0.0377766 15.82MiB 629.12KiB 12.83KiB 0 0.0388344 False False
syslog_loki -256.78KiB -1.61 100.00% 15.54MiB 276.55KiB 5.66KiB 0 0.0173729 15.29MiB 758.23KiB 15.41KiB 0 0.0484139 False False

@github-actions
Copy link

Soak Test Results

Baseline: 6cafa53
Comparison: f8e8ce5
Total Vector CPUs: 4

Explanation

A soak test is an integrated performance test for vector in a repeatable rig, with varying configuration for vector. What follows is a statistical summary of a brief vector run for each configuration across SHAs given above. The goal of these tests are to determine, quickly, if vector performance is changed and to what degree by a pull request. Where appropriate units are scaled per-core.

The table below, if present, lists those experiments that have experienced a statistically significant change in their throughput performance between baseline and comparision SHAs, with 90.0% confidence OR have been detected as newly erratic. Negative values mean that baseline is faster, positive comparison. Results that do not exhibit more than a ±8.87% change in mean throughput are discarded. An experiment is erratic if its coefficient of variation is greater than 0.3. The abbreviated table will be omitted if no interesting changes are observed.

No interesting changes in throughput with confidence ≥ 90.00% and absolute Δ mean >= ±8.87%:

Fine details of change detection per experiment.
experiment Δ mean Δ mean % confidence baseline mean baseline stdev baseline stderr baseline outlier % baseline CoV comparison mean comparison stdev comparison stderr comparison outlier % comparison CoV erratic declared erratic
splunk_hec_route_s3 358.45KiB 1.66 100.00% 21.08MiB 2.21MiB 45.97KiB 0 0.104746 21.43MiB 2.09MiB 43.67KiB 0 0.0973952 False False
datadog_agent_remap_blackhole_acks 806.05KiB 1.44 100.00% 54.62MiB 4.24MiB 88.38KiB 0 0.0776871 55.41MiB 3.05MiB 63.91KiB 0 0.0551193 False False
http_pipelines_blackhole_acks 13.47KiB 1.08 100.00% 1.21MiB 101.62KiB 2.07KiB 0 0.0818446 1.23MiB 80.67KiB 1.64KiB 0 0.0642728 False False
datadog_agent_remap_blackhole 600.74KiB 1.06 100.00% 55.25MiB 3.35MiB 69.79KiB 0 0.0605771 55.83MiB 2.8MiB 58.33KiB 0 0.0500611 False False
http_pipelines_no_grok_blackhole 74.14KiB 0.7 99.79% 10.37MiB 419.27KiB 8.56KiB 0 0.0394721 10.44MiB 1.08MiB 22.45KiB 0 0.103229 False False
http_to_http_acks 88.43KiB 0.5 28.47% 17.18MiB 8.21MiB 171.61KiB 0 0.477659 17.27MiB 8.22MiB 171.27KiB 0 0.475701 True True
http_pipelines_blackhole 5.02KiB 0.29 99.41% 1.69MiB 11.81KiB 247.08B 0 0.00683936 1.69MiB 88.5KiB 1.8KiB 0 0.0511008 False False
splunk_hec_to_splunk_hec_logs_noack 15.32KiB 0.06 80.09% 23.82MiB 476.22KiB 9.72KiB 0 0.0195178 23.84MiB 338.7KiB 6.91KiB 0 0.0138726 False False
splunk_hec_indexer_ack_blackhole 11.39KiB 0.05 37.54% 23.76MiB 830.43KiB 16.89KiB 0 0.0341296 23.77MiB 787.0KiB 16.01KiB 0 0.0323295 False False
enterprise_http_to_http -6.88KiB -0.03 51.63% 23.85MiB 257.55KiB 5.26KiB 0 0.0105454 23.84MiB 405.27KiB 8.29KiB 0 0.0165989 False False
datadog_agent_remap_datadog_logs_acks -17.79KiB -0.03 12.41% 60.39MiB 3.32MiB 69.46KiB 0 0.0549906 60.37MiB 4.33MiB 90.19KiB 0 0.0717559 False False
splunk_hec_to_splunk_hec_logs_acks -15.54KiB -0.06 46.13% 23.75MiB 848.47KiB 17.26KiB 0 0.0348767 23.74MiB 907.95KiB 18.46KiB 0 0.0373453 False False
file_to_blackhole -85.61KiB -0.09 57.13% 95.35MiB 3.6MiB 74.54KiB 0 0.0377008 95.27MiB 3.77MiB 78.37KiB 0 0.0395594 False False
http_to_http_json -39.55KiB -0.16 99.55% 23.85MiB 374.05KiB 7.64KiB 0 0.0153158 23.81MiB 570.19KiB 11.63KiB 0 0.0233846 False False
fluent_elasticsearch -156.55KiB -0.19 100.00% 79.47MiB 53.46KiB 1.08KiB 0 0.000656837 79.32MiB 1.39MiB 28.61KiB 0 0.0175337 False False
http_to_http_noack -68.71KiB -0.28 99.38% 23.82MiB 599.79KiB 12.26KiB 0 0.0245844 23.75MiB 1.05MiB 21.9KiB 0 0.0441981 False False
syslog_regex_logs2metric_ddmetrics -36.69KiB -0.46 88.29% 7.81MiB 799.26KiB 16.29KiB 0 0.0998881 7.78MiB 825.41KiB 16.82KiB 0 0.103633 False False
socket_to_socket_blackhole -204.81KiB -0.85 100.00% 23.4MiB 220.09KiB 4.49KiB 0 0.00918411 23.2MiB 173.64KiB 3.54KiB 0 0.00730832 False False
syslog_splunk_hec_logs -197.85KiB -1.22 100.00% 15.85MiB 791.72KiB 16.11KiB 0 0.0487573 15.66MiB 657.28KiB 13.41KiB 0 0.0409773 False False
datadog_agent_remap_datadog_logs -835.94KiB -1.34 100.00% 60.98MiB 1.22MiB 25.54KiB 0 0.019966 60.16MiB 4.2MiB 87.45KiB 0 0.0698036 False False
http_text_to_http_json -567.03KiB -1.37 100.00% 40.32MiB 776.34KiB 15.85KiB 0 0.018799 39.77MiB 784.54KiB 16.01KiB 0 0.0192621 False False
syslog_loki -272.14KiB -1.71 100.00% 15.5MiB 257.93KiB 5.28KiB 0 0.0162425 15.24MiB 753.86KiB 15.32KiB 0 0.048301 False False
syslog_humio_logs -280.61KiB -1.74 100.00% 15.72MiB 229.53KiB 4.69KiB 0 0.0142553 15.45MiB 234.26KiB 4.8KiB 0 0.0148069 False False
syslog_log2metric_humio_metrics -180.84KiB -1.79 100.00% 9.86MiB 134.88KiB 2.76KiB 0 0.0133585 9.68MiB 454.17KiB 9.24KiB 0 0.0458019 False False
syslog_log2metric_splunk_hec_metrics -334.3KiB -1.99 100.00% 16.42MiB 602.72KiB 12.29KiB 0 0.0358323 16.1MiB 681.95KiB 13.89KiB 0 0.0413653 False False

@github-actions
Copy link

Soak Test Results

Baseline: cb996f3
Comparison: 69f1db0
Total Vector CPUs: 4

Explanation

A soak test is an integrated performance test for vector in a repeatable rig, with varying configuration for vector. What follows is a statistical summary of a brief vector run for each configuration across SHAs given above. The goal of these tests are to determine, quickly, if vector performance is changed and to what degree by a pull request. Where appropriate units are scaled per-core.

The table below, if present, lists those experiments that have experienced a statistically significant change in their throughput performance between baseline and comparision SHAs, with 90.0% confidence OR have been detected as newly erratic. Negative values mean that baseline is faster, positive comparison. Results that do not exhibit more than a ±8.87% change in mean throughput are discarded. An experiment is erratic if its coefficient of variation is greater than 0.3. The abbreviated table will be omitted if no interesting changes are observed.

No interesting changes in throughput with confidence ≥ 90.00% and absolute Δ mean >= ±8.87%:

Fine details of change detection per experiment.
experiment Δ mean Δ mean % confidence baseline mean baseline stdev baseline stderr baseline outlier % baseline CoV comparison mean comparison stdev comparison stderr comparison outlier % comparison CoV erratic declared erratic
socket_to_socket_blackhole 296.08KiB 1.25 100.00% 23.14MiB 575.19KiB 11.74KiB 0 0.0242684 23.43MiB 464.68KiB 9.49KiB 0 0.0193636 False False
http_pipelines_blackhole_acks 6.89KiB 0.55 98.93% 1.21MiB 97.39KiB 1.98KiB 0 0.0784109 1.22MiB 89.68KiB 1.83KiB 0 0.0717983 False False
datadog_agent_remap_blackhole_acks 318.09KiB 0.54 99.85% 57.87MiB 3.89MiB 80.96KiB 0 0.0671508 58.19MiB 2.84MiB 59.32KiB 0 0.0487578 False False
http_to_http_acks 89.59KiB 0.5 28.72% 17.38MiB 8.23MiB 172.13KiB 0 0.473436 17.47MiB 8.23MiB 172.0KiB 0 0.471098 True True
splunk_hec_route_s3 68.47KiB 0.31 73.77% 21.65MiB 2.16MiB 44.94KiB 0 0.099701 21.72MiB 1.98MiB 41.36KiB 0 0.0910878 False False
datadog_agent_remap_blackhole 44.49KiB 0.08 36.97% 56.81MiB 3.54MiB 73.77KiB 0 0.0622696 56.85MiB 2.67MiB 55.69KiB 0 0.0469284 False False
splunk_hec_to_splunk_hec_logs_acks 20.54KiB 0.08 61.12% 23.75MiB 865.86KiB 17.61KiB 0 0.0355994 23.77MiB 789.4KiB 16.07KiB 0 0.0324281 False False
splunk_hec_to_splunk_hec_logs_noack 10.68KiB 0.04 66.54% 23.83MiB 427.79KiB 8.73KiB 0 0.0175295 23.84MiB 333.18KiB 6.8KiB 0 0.0136465 False False
enterprise_http_to_http -1.22KiB -0 13.08% 23.85MiB 256.96KiB 5.25KiB 0 0.0105207 23.85MiB 255.87KiB 5.24KiB 0 0.0104764 False False
file_to_blackhole -60.7KiB -0.06 53.57% 95.36MiB 2.57MiB 53.31KiB 0 0.0269593 95.3MiB 3.05MiB 63.54KiB 0 0.0320421 False False
http_to_http_json -26.26KiB -0.11 95.72% 23.85MiB 383.47KiB 7.83KiB 0 0.0157003 23.82MiB 505.06KiB 10.33KiB 0 0.0207009 False False
splunk_hec_indexer_ack_blackhole -28.6KiB -0.12 71.50% 23.76MiB 871.9KiB 17.75KiB 0 0.0358268 23.73MiB 984.4KiB 20.01KiB 0 0.0404971 False False
http_pipelines_blackhole -3.34KiB -0.19 95.05% 1.68MiB 19.01KiB 398.04B 0 0.0110586 1.67MiB 81.05KiB 1.65KiB 0 0.0472476 False False
fluent_elasticsearch -195.91KiB -0.24 100.00% 79.47MiB 52.75KiB 1.07KiB 0 0.000647995 79.28MiB 1.64MiB 33.69KiB 0 0.020652 False False
syslog_splunk_hec_logs -39.49KiB -0.27 82.72% 14.07MiB 992.09KiB 20.18KiB 0 0.0688478 14.03MiB 1017.07KiB 20.77KiB 0 0.0707753 False False
http_to_http_noack -84.2KiB -0.34 99.97% 23.84MiB 412.59KiB 8.43KiB 0 0.0169006 23.75MiB 1.05MiB 21.95KiB 0 0.044305 False False
datadog_agent_remap_datadog_logs_acks -912.2KiB -1.45 100.00% 61.39MiB 2.96MiB 61.89KiB 0 0.048198 60.5MiB 4.31MiB 89.62KiB 0 0.0711488 False False
syslog_humio_logs -233.77KiB -1.47 100.00% 15.53MiB 237.91KiB 4.86KiB 0 0.0149535 15.31MiB 199.72KiB 4.09KiB 0 0.01274 False False
syslog_loki -232.2KiB -1.49 100.00% 15.17MiB 331.15KiB 6.78KiB 0 0.021316 14.94MiB 772.53KiB 15.7KiB 0 0.0504828 False False
datadog_agent_remap_datadog_logs -947.69KiB -1.55 100.00% 59.59MiB 1020.52KiB 20.9KiB 0 0.0167209 58.66MiB 3.91MiB 81.44KiB 0 0.0666334 False False
http_text_to_http_json -749.18KiB -1.83 100.00% 39.93MiB 977.48KiB 19.95KiB 0 0.0239034 39.19MiB 936.6KiB 19.13KiB 0 0.0233312 False False
syslog_regex_logs2metric_ddmetrics -140.24KiB -1.85 100.00% 7.39MiB 1.02MiB 21.21KiB 0 0.137536 7.25MiB 1.01MiB 21.11KiB 0 0.139347 False False
syslog_log2metric_splunk_hec_metrics -312.22KiB -1.85 100.00% 16.51MiB 461.29KiB 9.4KiB 0 0.0272787 16.21MiB 712.65KiB 14.5KiB 0 0.0429358 False False
http_pipelines_no_grok_blackhole -215.2KiB -1.99 100.00% 10.54MiB 114.16KiB 2.33KiB 0 0.0105781 10.33MiB 1.03MiB 21.44KiB 0 0.0996903 False False
syslog_log2metric_humio_metrics -262.45KiB -2.72 100.00% 9.43MiB 514.45KiB 10.5KiB 0 0.0532798 9.17MiB 594.22KiB 12.1KiB 0 0.0632603 False False

@github-actions github-actions bot added the domain: external docs Anything related to Vector's external, public documentation label Oct 29, 2022
@caibirdme
Copy link
Contributor Author

@bruceg I fixed all the issues from your previous review, please re-review now

@bruceg bruceg requested review from bruceg and neuronull October 31, 2022 14:20
Copy link
Contributor

@neuronull neuronull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is coming along nicely! I have a couple follow-up comments below. Also:

  • It looks like there is a cue formatting error, probably related to whitespace. You can check this locally with make check-docs. What I sometimes do is copy a line in the same file I haven't modified, which has the same level of indentation I need, and edit the text of that line 🤷‍♂️ I can take a look at that if needed.

  • I think there is enough differences in these changes from the HTTP clickhouse sink, to warrant adding some integration test cases for it. We already have integration test module and docker-compose file for the HTTP clickhouse sink that this would extend. From the looks of the docker-compose file for that, I believe you could just copy-past the src/sinks/clickhouse/integration_tests.rs file into src/sinks/clickhouse/native/ , and replace the file's contents some native-specific integration tests there. The most basic being something like the insert_events() test case, but for the native protocol, which would verify the "happy path".

Copy link
Member

@bruceg bruceg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code is looking pretty good. I have a few more suggestions, but none of the code questions are correctness issues. Note also that the docs are failing the cue format tool:
https://github.com/vectordotdev/vector/actions/runs/3349954520/jobs/5550414838#step:14:30

@@ -236,13 +236,16 @@ bollard = { version = "0.13.0", default-features = false, features = ["ssl", "ch
bytes = { version = "1.2.1", default-features = false, features = ["serde"] }
bytesize = { version = "1.1.0", default-features = false }
chrono = { version = "0.4.22", default-features = false, features = ["serde"] }
chrono-tz = { version = "0.6", default-features = false, features = ["serde"], optional = true }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to avoid chrono-tz version 0.7 that we are using elsewhere?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is due to the issue in clickhouse-rs: suharev7/clickhouse-rs#158

I suggest for now leaving it as is before fixing it in the upstream. Then, we will be able to (hopefully easily) update the chrono-tz library. According to the linked issue, I do not know, how easily fix the current code to work with the latest chrono-tz (and I support clickhouse-rs does not work with it well anyway).

src/sinks/clickhouse/native/convert.rs Show resolved Hide resolved
src/sinks/clickhouse/native/convert.rs Show resolved Hide resolved
src/sinks/clickhouse/native/native_service.rs Show resolved Hide resolved
@zamazan4ik
Copy link
Contributor

zamazan4ik commented Nov 8, 2022

@caibirdme Do you plan to continue work on the PR? Would be really awesome to get this PR merged :)

@caibirdme
Copy link
Contributor Author

@zamazan4ik Yeah, but I'm too busy these days, always get off work at 23:00... I'll refocus on this pr maybe next week

@jszwedko jszwedko assigned bruceg and neuronull and unassigned bruceg Dec 2, 2022
@jszwedko jszwedko requested a review from davidhuie-dd December 2, 2022 20:23
@zamazan4ik
Copy link
Contributor

@caibirdme Did you able to find free time for the PR? :)

@zamazan4ik
Copy link
Contributor

@neuronull @bruceg @jszwedko I guess I could help finish this PR and resolve the left issues. What do you think about the idea?

@jszwedko
Copy link
Member

@neuronull @bruceg @jszwedko I guess I could help finish this PR and resolve the left issues. What do you think about the idea?

👍 that seems fine since it seems like @caibirdme may not have the time to push this forward now. I'd suggest creating a new PR based on this branch to address the feedback.

@zamazan4ik
Copy link
Contributor

Cue formatting fixed.

@jszwedko
Copy link
Member

Closing in-lieu of #15660

@jszwedko jszwedko closed this Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: external docs Anything related to Vector's external, public documentation domain: sinks Anything related to the Vector's sinks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants