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

Support for MongoDB Replica Set URI with readPreference and host:port enum in MongoDB dictionaries #46524

Merged
merged 10 commits into from Mar 7, 2023

Conversation

artem-yadr
Copy link
Contributor

Changelog category (leave one):

  • Improvement

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

  • Support for connection to a replica set via a URI with a host:port enum and support for the readPreference option in MongoDB dictionaries. Example URI: mongodb://db0.example.com:27017,db1.example.com:27017,db2.example.com:27017/?replicaSet=myRepl&readPreference=primary

@kssenii kssenii self-assigned this Feb 17, 2023
@kssenii kssenii added the can be tested Allows running workflows for external contributors label Feb 17, 2023
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-improvement Pull request with some product improvements label Feb 17, 2023
Copy link
Member

@kssenii kssenii left a comment

Choose a reason for hiding this comment

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

Please fix CI checks. See fast test failed with "Cannot build ClickHouse". You can see details in details button, press run.log there.
You will find why build fails:

base/poco/MongoDB/CMakeFiles/_poco_mongodb.dir/src/Connection.cpp.o -c /ClickHouse/base/poco/MongoDB/src/Connection.cpp
2023-02-20 15:30:47 /ClickHouse/base/poco/MongoDB/src/Connection.cpp:240:19: error: declaration shadows a local variable [-Werror,-Wshadow]
2023-02-20 15:30:47         Poco::URI theURI(newURI);
2023-02-20 15:30:47                   ^
2023-02-20 15:30:47 /ClickHouse/base/poco/MongoDB/src/Connection.cpp:198:15: note: previous declaration is here
2023-02-20 15:30:47     Poco::URI theURI(newURI);
2023-02-20 15:30:47 

base/poco/MongoDB/include/Poco/MongoDB/Connection.h Outdated Show resolved Hide resolved
artem-yadr and others added 2 commits February 27, 2023 16:18
Co-authored-by: Kseniia Sumarokova <54203879+kssenii@users.noreply.github.com>
@kssenii
Copy link
Member

kssenii commented Feb 27, 2023

/ClickHouse/base/poco/MongoDB/src/Connection.cpp
2023-02-27 17:33:54 In file included from ../../ClickHouse/base/poco/MongoDB/src/Connection.cpp:16:
2023-02-27 17:33:54 /ClickHouse/base/poco/MongoDB/include/Poco/MongoDB/Connection.h:165:36: error: return type of out-of-line definition of 'Poco::MongoDB::Connection::uri' differs from that in the declaration
2023-02-27 17:33:54     inline std::string Connection::uri() const
2023-02-27 17:33:54            ~~~~~~~~~~~             ^
2023-02-27 17:33:54 /ClickHouse/base/poco/MongoDB/include/Poco/MongoDB/Connection.h:94:29: note: previous declaration is here
2023-02-27 17:33:54         const std::string & uri() const;
2023-02-27 17:33:54       

@kssenii
Copy link
Member

kssenii commented Feb 28, 2023

2023-02-28 21:40:20 /ClickHouse/src/Dictionaries/MongoDBDictionarySource.cpp:121:38: error: no member named 'uri' in 'std::shared_ptr<Poco::MongoDB::Connection>'; did you mean to use '->' instead of '.'?
2023-02-28 21:40:20         Poco::URI poco_uri(connection.uri());
2023-02-28 21:40:20                                      ^
2023-02-28 21:40:20                                      ->
2023-02-28 21:40:20 1 error generated.

@kssenii kssenii merged commit a9a0d2f into ClickHouse:master Mar 7, 2023
142 checks passed
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-improvement Pull request with some product improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants