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

[clickhouse/exporter] Update create schema config option #33694

Merged

Conversation

SpencerTorres
Copy link
Member

EXTRACTED FROM #33614

DEPENDS ON #33693

Description:

A follow-up to #32282 that changes create_schema from *bool to bool, while also properly using the default config / factory.

Testing:

  • Updated tests

@dmitryax
Copy link
Member

Please rebase. I'm not sure why it depends on #33693

@SpencerTorres SpencerTorres force-pushed the update-create-schema-config-option branch from 7824a59 to 3936b42 Compare June 21, 2024 15:45
@SpencerTorres
Copy link
Member Author

Rebased. Need to fix the next PR but this one should be good now 👍

@crobert-1
Copy link
Member

Failing test is unrelated, I've opened #33715 to address the failure.

Copy link
Member

@crobert-1 crobert-1 left a comment

Choose a reason for hiding this comment

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

LGTM. I don't think this requires a changelog, but code owners and provide better input there.

@SpencerTorres SpencerTorres force-pushed the update-create-schema-config-option branch from 616c3c3 to dc1f681 Compare June 24, 2024 18:14
@dmitryax dmitryax merged commit 0fb17f2 into open-telemetry:main Jun 24, 2024
154 checks passed
@github-actions github-actions bot added this to the next release milestone Jun 24, 2024
@SpencerTorres SpencerTorres deleted the update-create-schema-config-option branch June 24, 2024 18:46
greatestusername-splunk pushed a commit to greatestusername/opentelemetry-collector-contrib that referenced this pull request Jun 24, 2024
[clickhouse/exporter] Update create schema config option (open-telemetry#33694)

**Description:**

A follow-up to open-telemetry#32282 that changes `create_schema` from `*bool` to
`bool`, while also properly using the default config / factory.

**Testing:**
- Updated tests

---------

Co-authored-by: Dmitrii Anoshin <anoshindx@gmail.com>
TylerHelmuth pushed a commit that referenced this pull request Jul 1, 2024
…onfig option. (#33614)

### DEPENDS ON #33693, #33694

**Description:**
Sets `async_insert` to true by default to enable [asynchronous
inserts](https://clickhouse.com/docs/en/optimize/asynchronous-inserts).
Because this value is being given a default, I have added a config
option under the same name.
Keep in mind that if `async_insert` is provided in `endpoint` or
`connection_params` it will take precedence and ignore this new config
option.

This is similar to how the `database` config option behaves.
The goal is to provide better insert performance by default, since not
all users will know to set it in their DSN URL.

This also opens the discussion to ___**whether or not this is a breaking
change**___. Depending on the deployment's telemetry throughput, this
could be an unexpected change that leads to
[`TOO_MANY_PARTS`](https://clickhouse.com/docs/knowledgebase/exception-too-many-parts)
errors. I don't expect this to be the case however, but I welcome any
discussion about this concern.

This PR is being resubmitted with suggestions from @crobert-1 and
@dmitryax applied.
Here are the extra changes with these suggestions applied:
- Extracted unrelated changes into separate PRs
- Updated `async_insert` to avoid using a `bool` pointer
- Updated tests to be able to support these
non-pointer-yet-still-optional test cases

**Testing:**
Ran integration tests. Also added an abundance of tests to check the
behavior of `async_insert` when present in `endpoint`,
`connection_params`, and exporter config.

**Documentation:**
- Updated README for all related changes

Unrelated change, also updated README's SQL samples to use `sql` instead
of `clickhouse` for the code samples to enable proper syntax
highlighting. ClickHouse SQL is compatible with plain SQL.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants