Skip to content

Added zookeeper multi-read support#36725

Closed
asokol123 wants to merge 7 commits intoClickHouse:masterfrom
asokol123:asokolovskiy/multi-read
Closed

Added zookeeper multi-read support#36725
asokol123 wants to merge 7 commits intoClickHouse:masterfrom
asokol123:asokolovskiy/multi-read

Conversation

@asokol123
Copy link
Copy Markdown

@asokol123 asokol123 commented Apr 27, 2022

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

  • Implemented multi-read support for get operation

  • Implemented multi-read support for simple list operation

  • Implemented server version check and fallback to loop-retry solution for old servers

  • Added multi-read support in ClickHouse Keeper

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 27, 2022

CLA assistant check
All committers have signed the CLA.

@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-not-for-changelog This PR should not be mentioned in the changelog label Apr 27, 2022
@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label Apr 27, 2022
@antonio2368
Copy link
Copy Markdown
Member

The KeeperStorage was refactored so it would be good to modify the Processors to be aligned with it
#37036

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why need this change?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Use something like

enum class OpKind : uint8_t
{
    Read,
    Write
};

Code will be easier to read

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
response.names = full_response->names;
response.names = std::move(full_response->names);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not instantly make a shared_ptr of SimpleListResponse?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not write?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
enum class OpKind : int32_t
enum class OpKind : uint8_t

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
void assert_eq(const T& left, const U& right)
void assert_eq(const T & left, const U & right)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
T* assert_dynamic_cast(U* ptr)
T * assert_dynamic_cast(U * ptr)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
T* result = dynamic_cast<T*>(ptr);
T * result = dynamic_cast<T *>(ptr);

Comment on lines 387 to 393
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This can be written with ternary operator

@antonio2368
Copy link
Copy Markdown
Member

Continued in #41410

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-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants