Skip to content

More options for SYSTEM SYNC REPLICA#48085

Merged
tavplubix merged 4 commits intomasterfrom
sync_replica_lightweight
Mar 31, 2023
Merged

More options for SYSTEM SYNC REPLICA#48085
tavplubix merged 4 commits intomasterfrom
sync_replica_lightweight

Conversation

@tavplubix
Copy link
Copy Markdown
Member

@tavplubix tavplubix commented Mar 27, 2023

Changelog category (leave one):

  • New Feature

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

Added LIGHTWEIGHT and PULL modifiers for SYSTEM SYNC REPLICA query. LIGHTWEIGHT version waits for fetches and drop-ranges only (merges and mutations are ignored). PULL version pulls new entries from ZooKeeper and does not wait for them. Fixes #47794

@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-feature Pull request with new product feature label Mar 27, 2023
@antonio2368 antonio2368 self-assigned this Mar 28, 2023

namespace DB
{
enum class SyncReplicaMode
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 SyncReplicaMode
enum class SyncReplicaMode : uint8_t

Comment on lines +2486 to +2487
bool is_lightweight = entry->type == LogEntry::GET_PART || entry->type == LogEntry::ATTACH_PART
|| entry->type == LogEntry::DROP_RANGE || entry->type == LogEntry::REPLACE_RANGE || entry->type == LogEntry::DROP_PART;
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.

I would prefer creating static constexpr std::array and doing std::any_of because this is huge.
But I'm fine either way.

@tavplubix
Copy link
Copy Markdown
Member Author

Integration tests (release) [4/4] - test_version_update_after_mutation - ORDER BY is missing, will add
Upgrade check (asan) - OOM in dmesg

@tavplubix tavplubix merged commit 9df882c into master Mar 31, 2023
@tavplubix tavplubix deleted the sync_replica_lightweight branch March 31, 2023 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-feature Pull request with new product feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Faster SYSTEM SYNC REPLICA

3 participants