Skip to content

MongoDB integration refactoring#63279

Merged
alexey-milovidov merged 90 commits intoClickHouse:masterfrom
allmazz:mongodb_refactoring
Sep 21, 2024
Merged

MongoDB integration refactoring#63279
alexey-milovidov merged 90 commits intoClickHouse:masterfrom
allmazz:mongodb_refactoring

Conversation

@allmazz
Copy link
Copy Markdown
Contributor

@allmazz allmazz commented May 2, 2024

Changelog category (leave one):

  • New Feature

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

MongoDB integration refactored: migration to new driver mongocxx from deprecated Poco::MongoDB, remove support for deprecated old protocol, support for connection by URI, support for all MongoDB types, support for WHERE and ORDER BY statements on MongoDB side, restriction for expression unsupported by MongoDB.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Current MongoDB integration is very limited: not all types are supported; WHERE and ORDER BY conditions applied on ClickHouse side, what needs to read ALL data from MongoDB collection.

Information about CI checks: https://clickhouse.com/docs/en/development/continuous-integration/

Modify your CI run

NOTE: If your merge the PR with modified CI you MUST KNOW what you are doing
NOTE: Checked options will be applied if set before CI RunConfig/PrepareRunConfig step

Include tests (required builds will be added automatically):

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Unit tests
  • Performance tests
  • All with ASAN
  • All with TSAN
  • All with Analyzer
  • All with Azure
  • Add your option here

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Performance tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All with Aarch64
  • Add your option here

Extra options:

  • do not test (only style check)
  • disable merge-commit (no merge from master before tests)
  • disable CI cache (job reuse)

Only specified batches in multi-batch jobs:

  • 1
  • 2
  • 3
  • 4
Details

@allmazz allmazz force-pushed the mongodb_refactoring branch from a46d70b to fa6bebb Compare May 2, 2024 16:50
@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label May 4, 2024
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-feature Pull request with new product feature label May 4, 2024
@alexey-milovidov alexey-milovidov removed the can be tested Allows running workflows for external contributors label May 4, 2024
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the submodule changed At least one submodule changed in this PR. label May 4, 2024
@robot-clickhouse-ci-2
Copy link
Copy Markdown
Contributor

robot-clickhouse-ci-2 commented May 4, 2024

This is an automated comment for commit de4c19e with description of existing statuses. It's updated for the latest CI running

✅ Click here to open a full report in a separate page

Successful checks
Check nameDescriptionStatus
AST fuzzerRuns randomly generated queries to catch program errors. The build type is optionally given in parenthesis. If it fails, ask a maintainer for help✅ success
BuildsThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
ClickBenchRuns [ClickBench](https://github.com/ClickHouse/ClickBench/) with instant-attach table✅ success
Compatibility checkChecks that clickhouse binary runs on distributions with old libc versions. If it fails, ask a maintainer for help✅ success
Docker keeper imageThe check to build and optionally push the mentioned image to docker hub✅ success
Docker server imageThe check to build and optionally push the mentioned image to docker hub✅ success
Docs checkBuilds and tests the documentation✅ success
Fast testNormally this is the first check that is ran for a PR. It builds ClickHouse and runs most of stateless functional tests, omitting some. If it fails, further checks are not started until it is fixed. Look at the report to see which tests fail, then reproduce the failure locally as described here✅ success
Flaky testsChecks if new added or modified tests are flaky by running them repeatedly, in parallel, with more randomization. Functional tests are run 100 times with address sanitizer, and additional randomization of thread scheduling. Integration tests are run up to 10 times. If at least once a new test has failed, or was too long, this check will be red. We don't allow flaky tests, read the doc✅ success
Install packagesChecks that the built packages are installable in a clear environment✅ success
Integration testsThe integration tests report. In parenthesis the package type is given, and in square brackets are the optional part/total tests✅ success
Performance ComparisonMeasure changes in query performance. The performance test report is described in detail here. In square brackets are the optional part/total tests✅ success
Stateful testsRuns stateful functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc✅ success
Stateless testsRuns stateless functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc✅ success
Stress testRuns stateless functional tests concurrently from several clients to detect concurrency-related errors✅ success
Style checkRuns a set of checks to keep the code style clean. If some of tests failed, see the related log from the report✅ success
Unit testsRuns the unit tests for different release types✅ success
Upgrade checkRuns stress tests on server version from last release and then tries to upgrade it to the version from the PR. It checks if the new server can successfully startup without any errors, crashes or sanitizer asserts✅ success

@vdimir vdimir self-assigned this May 6, 2024
@vdimir
Copy link
Copy Markdown
Member

vdimir commented May 6, 2024

Great initiative!

A couple of questions for now:

  • Does it support the mongodb+srv:// protocol? Can it be used directly with Atlas?

  • Are the connection parameters supported by the current Poco::MongoDB implementation? A user may pass something like authSource=admin;ssl=true;readPreference=primaryPreferred;retryWrites=true;connectTimeoutMS=5000;socketTimeoutMS=5000 as the last storage argument, and some of these parameters are parsed by Poco. Won't this be broken?

@allmazz
Copy link
Copy Markdown
Contributor Author

allmazz commented May 6, 2024

  • Does it support the mongodb+srv:// protocol? Can it be used directly with Atlas?

It's supposed, but we have to test it

@allmazz
Copy link
Copy Markdown
Contributor Author

allmazz commented May 6, 2024

  • Won't this be broken?

should not, but need to be tested.
I will check it out soon

@allmazz
Copy link
Copy Markdown
Contributor Author

allmazz commented May 12, 2024

  • Does it support the mongodb+srv:// protocol? Can it be used directly with Atlas?

It's supposed, but we have to test it

yes, it works now

@allmazz
Copy link
Copy Markdown
Contributor Author

allmazz commented May 12, 2024

  • Won't this be broken?

should not, but need to be tested. I will check it out soon

this will not be broken, but your example is not valid. docs

@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label May 12, 2024
@vdimir vdimir marked this pull request as draft May 21, 2024 09:52
@allmazz allmazz marked this pull request as ready for review May 25, 2024 23:06
@vdimir vdimir added this pull request to the merge queue Sep 20, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 20, 2024
@alexey-milovidov alexey-milovidov added this pull request to the merge queue Sep 21, 2024
Merged via the queue into ClickHouse:master with commit 14cb02a Sep 21, 2024
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 21, 2024
github-merge-queue bot pushed a commit that referenced this pull request Sep 21, 2024
alexey-milovidov added a commit that referenced this pull request Sep 22, 2024
This reverts commit 14cb02a, reversing
changes made to a940a9e.
@alexey-milovidov alexey-milovidov mentioned this pull request Sep 22, 2024
21 tasks
alexey-milovidov added a commit that referenced this pull request Sep 22, 2024
@alexey-milovidov
Copy link
Copy Markdown
Member

@allmazz, resubmit with fixes: #69850

vdimir added a commit that referenced this pull request Sep 23, 2024
github-merge-queue bot pushed a commit that referenced this pull request Sep 24, 2024
@alexey-milovidov
Copy link
Copy Markdown
Member

alexey-milovidov commented Oct 31, 2024

@allmazz, please send a pull request to enable it by default and remove the old integration.

@alexey-milovidov
Copy link
Copy Markdown
Member

@allmazz, could you please also take over this pull request? #54638

MongoDB feels natural with schema inference, and it looks like it is not a complex change.

@allmazz
Copy link
Copy Markdown
Contributor Author

allmazz commented Oct 31, 2024

please send a pull request to enable it by default and remove the old integration.

yes, of course. but I think we should do it in the next release for more soft transition.

could you please also take over this pull request? #54638

I will take a look

@allmazz
Copy link
Copy Markdown
Contributor Author

allmazz commented Nov 15, 2024

@allmazz, please send a pull request to enable it by default and remove the old integration.

There is a PR for this: #71997

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors pr-feature Pull request with new product feature pr-synced-to-cloud The PR is synced to the cloud repo submodule changed At least one submodule changed in this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants